Package com.sun.mail.auth

# Class OAuth2SaslClient

java.lang.Object
com.sun.mail.auth.OAuth2SaslClient

All Implemented Interfaces:
  `SaslClient`

public class OAuth2SaslClient extends Object implements SaslClient
Jakarta Mail SASL client for OAUTH2.

Author:
  Bill Shannon
See Also:
  - RFC 6749 - OAuth 2.0 Authorization Framework
  - RFC 6750 - OAuth 2.0 Authorization Framework: Bearer Token Usage

## Constructor Summary

Constructors
Constructor
Description
`OAuth2SaslClient(Map<String,?> props, CallbackHandler cbh)`

## Method Summary

Modifier and Type
Method
Description
`void`
`dispose()`
`byte[]`
`evaluateChallenge(byte[] challenge)`
`String`
`getMechanismName()`
`Object`
`getNegotiatedProperty(String propName)`
`boolean`
`hasInitialResponse()`
`boolean`
`isComplete()`
`byte[]`
`unwrap(byte[] incoming, int offset, int len)`
`byte[]`
`wrap(byte[] outgoing, int offset, int len)`

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

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

## Constructor Details

### OAuth2SaslClient

public OAuth2SaslClient(Map<String,?> props, CallbackHandler cbh)

## Method Details

### getMechanismName

public String getMechanismName()

Specified by:
  `getMechanismName` in interface `SaslClient`

### hasInitialResponse

public boolean hasInitialResponse()

Specified by:
  `hasInitialResponse` in interface `SaslClient`

### evaluateChallenge

public byte[] evaluateChallenge(byte[] challenge) throws SaslException

Specified by:
  `evaluateChallenge` in interface `SaslClient`
Throws:
  `SaslException`

### isComplete

public boolean isComplete()

Specified by:
  `isComplete` in interface `SaslClient`

### unwrap

public byte[] unwrap(byte[] incoming, int offset, int len) throws SaslException

Specified by:
  `unwrap` in interface `SaslClient`
Throws:
  `SaslException`

### wrap

public byte[] wrap(byte[] outgoing, int offset, int len) throws SaslException

Specified by:
  `wrap` in interface `SaslClient`
Throws:
  `SaslException`

### getNegotiatedProperty

public Object getNegotiatedProperty(String propName)

Specified by:
  `getNegotiatedProperty` in interface `SaslClient`

### dispose

public void dispose() throws SaslException

Specified by:
  `dispose` in interface `SaslClient`
Throws:
  `SaslException`