public abstract class AbstractServerAuthModule extends Object implements ServerAuthModule
The ServerAuthModule can delegate to a login module passed via the module option "login-module-delegate"
Modifier and Type | Field and Description |
---|---|
protected CallbackHandler |
callbackHandler
Call back handler
|
protected Map |
options |
protected MessagePolicy |
requestPolicy |
protected MessagePolicy |
responsePolicy |
protected ArrayList<Class> |
supportedTypes |
Constructor and Description |
---|
AbstractServerAuthModule() |
Modifier and Type | Method and Description |
---|---|
void |
cleanSubject(MessageInfo messageInfo,
Subject subject)
Remove implementation specific principals and credentials from the subject.
|
CallbackHandler |
getCallbackHandler() |
Class[] |
getSupportedMessageTypes()
Get the one or more Class objects representing the message
types supported by the module.
|
void |
initialize(MessagePolicy requestPolicy,
MessagePolicy responsePolicy,
CallbackHandler handler,
Map options)
Initialize this module with request and response message policies to
enforce, a CallbackHandler, and any module-specific configuration
properties.
|
void |
setCallbackHandler(CallbackHandler callbackHandler) |
protected abstract boolean |
validate(Subject clientSubject,
MessageInfo messageInfo)
Subclasses have to implement this method to actually validate the subject
|
AuthStatus |
validateRequest(MessageInfo messageInfo,
Subject clientSubject,
Subject serviceSubject)
This method delegates to a login module if configured in the module options.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
secureResponse
protected CallbackHandler callbackHandler
protected MessagePolicy requestPolicy
protected MessagePolicy responsePolicy
protected Map options
public void initialize(MessagePolicy requestPolicy, MessagePolicy responsePolicy, CallbackHandler handler, Map options) throws AuthException
ServerAuthModule
Initialize this module with request and response message policies to enforce, a CallbackHandler, and any module-specific configuration properties.
The request policy and the response policy must not both be null.
initialize
in interface ServerAuthModule
requestPolicy
- the request policy this module must enforce, or null.responsePolicy
- the response policy this module must enforce, or null.handler
- CallbackHandler used to request information.options
- a Map of module-specific configuration properties.AuthException
- - if module initialization fails, including for the case
where the options argument contains elements that are
not supported by the module.ServerAuthModule.initialize(javax.security.auth.message.MessagePolicy, javax.security.auth.message.MessagePolicy, javax.security.auth.callback.CallbackHandler, java.util.Map)
public void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException
ServerAuth
cleanSubject
in interface ServerAuth
messageInfo
- - A contextual object that encapsulates the client request
and server response objects, and that may be used to save
state across a sequence of calls made to the methods of
this interface for the purpose of completing a secure
message exchange.subject
- - The Subject instance from which the Principals and credentials
are to be removed.AuthException
- if an error occurs during the Subject processing.public AuthStatus validateRequest(MessageInfo messageInfo, Subject clientSubject, Subject serviceSubject) throws AuthException
validateRequest
in interface ServerAuth
messageInfo
- - A contextual object that encapsulates the client
request and server response objects, and that may be
used to save state across a sequence of calls made to
the methods of this interface for the purpose of
completing a secure message exchange.clientSubject
- - A Subject that represents the recipient of the
service response, or null. It may be used by the method
implementation as the source of Principals or credentials
to be used to validate the response. If the Subject is
not null, the method implementation may add additional
Principals or credentials (pertaining to the recipient
of the service request) to the Subject.serviceSubject
- - A Subject that represents the source of the service
response, or null. If the Subject is not null, the method
implementation may add additional Principals or credentials
(pertaining to the source of the service response) to the Subject.AuthException
public Class[] getSupportedMessageTypes()
ServerAuthModule
getSupportedMessageTypes
in interface ServerAuthModule
ServerAuthModule.getSupportedMessageTypes()
public CallbackHandler getCallbackHandler()
public void setCallbackHandler(CallbackHandler callbackHandler)
protected abstract boolean validate(Subject clientSubject, MessageInfo messageInfo) throws AuthException
AuthException
Copyright © 2018 JBoss by Red Hat. All rights reserved.