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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()byte[]evaluateChallenge(byte[] challenge)StringgetMechanismName()ObjectgetNegotiatedProperty(String propName)booleanhasInitialResponse()booleanisComplete()byte[]unwrap(byte[] incoming, int offset, int len)byte[]wrap(byte[] outgoing, int offset, int len)
-
-
-
Constructor Detail
-
OAuth2SaslClient
public OAuth2SaslClient(Map<String,?> props, CallbackHandler cbh)
-
-
Method Detail
-
getMechanismName
public String getMechanismName()
- Specified by:
getMechanismNamein interfaceSaslClient
-
hasInitialResponse
public boolean hasInitialResponse()
- Specified by:
hasInitialResponsein interfaceSaslClient
-
evaluateChallenge
public byte[] evaluateChallenge(byte[] challenge) throws SaslException- Specified by:
evaluateChallengein interfaceSaslClient- Throws:
SaslException
-
isComplete
public boolean isComplete()
- Specified by:
isCompletein interfaceSaslClient
-
unwrap
public byte[] unwrap(byte[] incoming, int offset, int len) throws SaslException- Specified by:
unwrapin interfaceSaslClient- Throws:
SaslException
-
wrap
public byte[] wrap(byte[] outgoing, int offset, int len) throws SaslException- Specified by:
wrapin interfaceSaslClient- Throws:
SaslException
-
getNegotiatedProperty
public Object getNegotiatedProperty(String propName)
- Specified by:
getNegotiatedPropertyin interfaceSaslClient
-
dispose
public void dispose() throws SaslException- Specified by:
disposein interfaceSaslClient- Throws:
SaslException
-
-