public class OpenAMSessionModule extends Object implements AsyncServerAuthModule
Constructor and Description |
---|
OpenAMSessionModule()
Construct OpenAMSessionModule - use default options.
|
OpenAMSessionModule(Options httpClientOptions)
Cosntruct OpenAMSessionModule - use provide options for loading the HttpClientProvider.
|
Modifier and Type | Method and Description |
---|---|
Promise<Void,AuthenticationException> |
cleanSubject(MessageInfoContext messageInfo,
Subject clientSubject)
No state to clear out from the client subject.
|
String |
getModuleId()
Gets the ID of the module to be used in creating authentication audit logs to uniquely
identify the authentication module and its outcome when processing a request message.
|
Collection<Class<?>> |
getSupportedMessageTypes()
Will return an array of classes indicating that the CHF Http profile is supported.
|
Promise<Void,AuthenticationException> |
initialize(javax.security.auth.message.MessagePolicy requestPolicy,
javax.security.auth.message.MessagePolicy responsePolicy,
CallbackHandler callbackHandler,
Map<String,Object> options)
Will initialise the module with the specified configuration properties.
|
Promise<javax.security.auth.message.AuthStatus,AuthenticationException> |
secureResponse(MessageInfoContext messageInfo,
Subject serviceSubject)
No action to perform on secure response.
|
Promise<javax.security.auth.message.AuthStatus,AuthenticationException> |
validateRequest(MessageInfoContext messageInfo,
Subject clientSubject,
Subject serviceSubject)
Validates whether or not the request contains a valid OpenAM SSO Token Id.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
public OpenAMSessionModule()
public OpenAMSessionModule(Options httpClientOptions)
httpClientOptions
- The options which will be used to configure the HTTP client.public String getModuleId()
AsyncServerAuthModule
getModuleId
in interface AsyncServerAuthModule
public Promise<Void,AuthenticationException> initialize(javax.security.auth.message.MessagePolicy requestPolicy, javax.security.auth.message.MessagePolicy responsePolicy, CallbackHandler callbackHandler, Map<String,Object> options)
Property | Type | Required | Default Value | Description | Example |
---|---|---|---|---|---|
openamDeploymentUrl | String | Yes | N/A | The fully qualified URL of the OpenAM deployment, including the context path | http://example.com:8080/openam/ |
openamSSOTokenCookieName | String | Yes | N/A | The name of the cookie used by OpenAM to set the SSO Token Id | iPlanetDirectoryPro |
trustManagerAlgorithm | String | When useSSL is true | SunX509 | Certificate algorithm for the trust manager | SunX509 |
truststorePath | String | When useSSL is true | N/A | The absolute path to the location of the SSL Trust Store | /opt/truststore.jks |
truststoreType | String | When useSSL is true | N/A | The type of the SSL Trust Store | JKS |
truststorePassword | String | When useSSL is true | N/A | The password for the SSL Trust Store | cangetin |
initialize
in interface AsyncServerAuthModule
requestPolicy
- The request policy this module must enforce, or null
.responsePolicy
- The response policy this module must enforce, or null
.callbackHandler
- CallbackHandler
used to request information.options
- A Map
of module-specific configuration properties.Promise
that will be completed, as some point in the future, with
either a successful value or a failure value. A successfully completed Promise
will
contain no value and a failed completed Promise
will contain an
AuthenticationException
if module initialization fails, including for the case
where the options argument contains elements that are not supported by the module.IllegalArgumentException
- If any of the required configuration properties are not set.public Collection<Class<?>> getSupportedMessageTypes()
getSupportedMessageTypes
in interface AsyncServerAuthModule
public Promise<javax.security.auth.message.AuthStatus,AuthenticationException> validateRequest(MessageInfoContext messageInfo, Subject clientSubject, Subject serviceSubject)
validateRequest
in interface AsyncServerAuthModule
messageInfo
- The message context info for this request.clientSubject
- A Subject
that represents the subject of this request.serviceSubject
- A Subject
that represents the subject for the server or
null
. It may be used to secure the message response.AuthStatus
,
ServerAuth.validateRequest(
javax.security.auth.message.MessageInfo, Subject, Subject)
public Promise<javax.security.auth.message.AuthStatus,AuthenticationException> secureResponse(MessageInfoContext messageInfo, Subject serviceSubject)
secureResponse
in interface AsyncServerAuthModule
messageInfo
- The message context info for this request.serviceSubject
- A Subject
that represents the subject for the server or
null
. It may be used to secure the message response.A Promise
that will be completed, as some point in the future, with
either a successful value or a failure value.
A successfully completed Promise
will contain an AuthStatus
representing
the completion status of the processing. See
ServerAuth.secureResponse(
javax.security.auth.message.MessageInfo, Subject)
for the allowed
AuthStatus
values. Note AuthStatus.SEND_CONTINUE
is not supported by this
interface
A failed completed Promise
will contain an AuthenticationException
when
the message processing failed without establishing a failure response message in the
MessageContextInfo
.
AuthStatus
,
ServerAuth.secureResponse(
javax.security.auth.message.MessageInfo, Subject)
public Promise<Void,AuthenticationException> cleanSubject(MessageInfoContext messageInfo, Subject clientSubject)
cleanSubject
in interface AsyncServerAuthModule
messageInfo
- The message context info for this request.clientSubject
- A Subject
that represents the subject of this request.Promise
that will be completed, as some point in the future, with
either a successful value or a failure value. A successfully completed Promise
will
contain no value and a failed completed Promise
will contain an
AuthenticationException
if an error occurs during the Subject
processing.ServerAuth.cleanSubject(
javax.security.auth.message.MessageInfo, Subject)
Copyright © 2025 Open Identity Platform Community. All rights reserved.