Package com.sun.mail.auth

## Class OAuth2SaslClientFactory

- java.lang.Object
- - com.sun.mail.auth.OAuth2SaslClientFactory

All Implemented Interfaces:
  `SaslClientFactory`

    public class OAuth2SaslClientFactory
    extends Object
    implements SaslClientFactory

JavaMail SASL client factory for OAUTH2.

Author:
  Bill Shannon

### Constructor Summary

Constructors
`OAuth2SaslClientFactory​()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`SaslClient` `createSaslClient​(String[] mechanisms, String authorizationId, String protocol, String serverName, Map<String,?> props, CallbackHandler cbh)`
`String[]` `getMechanismNames​(Map<String,?> props)`
`static void` `init​()` Initialize this OAUTH2 provider, but only if there isn't one already.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### OAuth2SaslClientFactory

    public OAuth2SaslClientFactory​()

### Method Detail

#### createSaslClient

    public SaslClient createSaslClient​(String[] mechanisms,
                                       String authorizationId,
                                       String protocol,
                                       String serverName,
                                       Map<String,?> props,
                                       CallbackHandler cbh)
                                throws SaslException

Specified by:
  `createSaslClient` in interface `SaslClientFactory`
Throws:
  `SaslException`

#### getMechanismNames

    public String[] getMechanismNames​(Map<String,?> props)

Specified by:
  `getMechanismNames` in interface `SaslClientFactory`

#### init

    public static void init​()

Initialize this OAUTH2 provider, but only if there isn't one already. If we're not allowed to add this provider, just give up silently.