Package org.wildfly.security.sasl.oauth2
Class OAuth2SaslServer
- java.lang.Object
-
- org.wildfly.security.sasl.util.AbstractSaslParticipant
-
- org.wildfly.security.sasl.util.AbstractSaslServer
-
- org.wildfly.security.sasl.oauth2.OAuth2SaslServer
-
- All Implemented Interfaces:
SaslServer
,SaslWrapper
final class OAuth2SaslServer extends AbstractSaslServer
An OAuth2 Sasl Server based on RFC-7628.- Author:
- Pedro Igor
-
-
Field Summary
Fields Modifier and Type Field Description private OAuth2Server
oAuth2Server
private static int
S_FIRST_MESSAGE
private static int
S_IN_ERROR
-
Fields inherited from class org.wildfly.security.sasl.util.AbstractSaslParticipant
COMPLETE_STATE, FAILED_STATE, NO_BYTES
-
Fields inherited from interface org.wildfly.security.sasl.util.SaslWrapper
IDENTITY
-
-
Constructor Summary
Constructors Constructor Description OAuth2SaslServer(String mechanismName, String protocol, String serverName, CallbackHandler callbackHandler, OAuth2Server oAuth2Server)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Dispose of this participant.protected byte[]
evaluateMessage(int state, byte[] response)
String
getAuthorizationID()
-
Methods inherited from class org.wildfly.security.sasl.util.AbstractSaslServer
evaluateResponse
-
Methods inherited from class org.wildfly.security.sasl.util.AbstractSaslParticipant
assertComplete, evaluateMessage, getCallbackHandler, getIntProperty, getMechanismName, getNegotiatedProperty, getProtocol, getServerName, getStringProperty, getWrapper, handleCallbacks, init, isComplete, negotiationComplete, setNegotiationState, setWrapper, tryHandleCallbacks, unwrap, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.security.sasl.SaslServer
getMechanismName, getNegotiatedProperty, isComplete, unwrap, wrap
-
-
-
-
Field Detail
-
S_FIRST_MESSAGE
private static final int S_FIRST_MESSAGE
- See Also:
- Constant Field Values
-
S_IN_ERROR
private static final int S_IN_ERROR
- See Also:
- Constant Field Values
-
oAuth2Server
private OAuth2Server oAuth2Server
-
-
Constructor Detail
-
OAuth2SaslServer
OAuth2SaslServer(String mechanismName, String protocol, String serverName, CallbackHandler callbackHandler, OAuth2Server oAuth2Server)
-
-
Method Detail
-
getAuthorizationID
public String getAuthorizationID()
-
evaluateMessage
protected byte[] evaluateMessage(int state, byte[] response) throws SaslException
- Specified by:
evaluateMessage
in classAbstractSaslParticipant
- Throws:
SaslException
-
dispose
public void dispose() throws SaslException
Description copied from class:AbstractSaslParticipant
Dispose of this participant.- Specified by:
dispose
in interfaceSaslServer
- Overrides:
dispose
in classAbstractSaslParticipant
- Throws:
SaslException
- if disposal failed
-
-