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
Jakarta Mail SASL client factory for OAUTH2.

Author:
  Bill Shannon

## Constructor Summary

Constructors
Constructor
Description
`OAuth2SaslClientFactory()`

## Method Summary

Modifier and Type
Method
Description
`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 Details

### OAuth2SaslClientFactory

public OAuth2SaslClientFactory()

## Method Details

### 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.