- java.lang.Object
-
- com.sun.mail.auth.OAuth2SaslClient
-
- All Implemented Interfaces:
javax.security.sasl.SaslClient
public class OAuth2SaslClient extends java.lang.Object implements javax.security.sasl.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(java.util.Map<java.lang.String,?> props, javax.security.auth.callback.CallbackHandler cbh)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
byte[]
evaluateChallenge(byte[] challenge)
java.lang.String
getMechanismName()
java.lang.Object
getNegotiatedProperty(java.lang.String propName)
boolean
hasInitialResponse()
boolean
isComplete()
byte[]
unwrap(byte[] incoming, int offset, int len)
byte[]
wrap(byte[] outgoing, int offset, int len)
-
-
-
Method Detail
-
getMechanismName
public java.lang.String getMechanismName()
- Specified by:
getMechanismName
in interfacejavax.security.sasl.SaslClient
-
hasInitialResponse
public boolean hasInitialResponse()
- Specified by:
hasInitialResponse
in interfacejavax.security.sasl.SaslClient
-
evaluateChallenge
public byte[] evaluateChallenge(byte[] challenge) throws javax.security.sasl.SaslException
- Specified by:
evaluateChallenge
in interfacejavax.security.sasl.SaslClient
- Throws:
javax.security.sasl.SaslException
-
isComplete
public boolean isComplete()
- Specified by:
isComplete
in interfacejavax.security.sasl.SaslClient
-
unwrap
public byte[] unwrap(byte[] incoming, int offset, int len) throws javax.security.sasl.SaslException
- Specified by:
unwrap
in interfacejavax.security.sasl.SaslClient
- Throws:
javax.security.sasl.SaslException
-
wrap
public byte[] wrap(byte[] outgoing, int offset, int len) throws javax.security.sasl.SaslException
- Specified by:
wrap
in interfacejavax.security.sasl.SaslClient
- Throws:
javax.security.sasl.SaslException
-
getNegotiatedProperty
public java.lang.Object getNegotiatedProperty(java.lang.String propName)
- Specified by:
getNegotiatedProperty
in interfacejavax.security.sasl.SaslClient
-
dispose
public void dispose() throws javax.security.sasl.SaslException
- Specified by:
dispose
in interfacejavax.security.sasl.SaslClient
- Throws:
javax.security.sasl.SaslException
-
-