@ThreadSafe public interface IdPSession extends IdentifiedComponent
| Modifier and Type | Field and Description |
|---|---|
static String |
MDC_ATTRIBUTE
Name of
MDC attribute that holds the current session ID: idp.session.id. |
| Modifier and Type | Method and Description |
|---|---|
AuthenticationResult |
addAuthenticationResult(AuthenticationResult result)
Add a new
AuthenticationResult to this IdP session, replacing any
existing result of the same flow ID. |
SPSession |
addSPSession(SPSession spSession)
Add a new SP session to this IdP session, replacing any existing session for the same
service.
|
boolean |
checkAddress(String address)
Test the session's validity based on the supplied client address, possibly binding it
to the session if appropriate.
|
boolean |
checkTimeout()
Test the session's validity based on inactivity, while updating the last activity time.
|
AuthenticationResult |
getAuthenticationResult(String flowId)
Get an associated
AuthenticationResult given its flow ID. |
Set<AuthenticationResult> |
getAuthenticationResults()
Get the unmodifiable set of
AuthenticationResults associated with this session. |
long |
getCreationInstant()
Get the time, in milliseconds since the epoch, when this session was created.
|
long |
getLastActivityInstant()
Get the last activity instant, in milliseconds since the epoch, for the session.
|
String |
getPrincipalName()
Get the canonical principal name for the session.
|
SPSession |
getSPSession(String serviceId)
Get the SPSession for a given service.
|
Set<SPSession> |
getSPSessions()
Gets the unmodifiable collection of service sessions associated with this session.
|
boolean |
removeAuthenticationResult(AuthenticationResult result)
Disassociate an
AuthenticationResult from this IdP session. |
boolean |
removeSPSession(SPSession spSession)
Disassociate the given SP session from this IdP session.
|
void |
updateAuthenticationResultActivity(AuthenticationResult result)
Update the recorded activity timestamp for an
AuthenticationResult associated with this
session. |
getIdstatic final String MDC_ATTRIBUTE
MDC attribute that holds the current session ID: idp.session.id.@Nonnull @NotEmpty String getPrincipalName()
@Positive long getCreationInstant()
@Positive long getLastActivityInstant()
boolean checkAddress(@Nonnull@NotEmpty String address) throws SessionException
address - client address for validationSessionException - if an error occurs binding the address to the sessionboolean checkTimeout()
throws SessionException
SessionException - if an error occurs updating the activity time@Nonnull @NonnullElements @NotLive @Unmodifiable Set<AuthenticationResult> getAuthenticationResults()
AuthenticationResults associated with this session.@Nullable AuthenticationResult getAuthenticationResult(@Nonnull@NotEmpty String flowId)
AuthenticationResult given its flow ID.flowId - the ID of the AuthenticationResult@Nullable AuthenticationResult addAuthenticationResult(@Nonnull AuthenticationResult result) throws SessionException
AuthenticationResult to this IdP session, replacing any
existing result of the same flow ID.result - the result to addSessionException - if an error occurs updating the sessionvoid updateAuthenticationResultActivity(@Nonnull AuthenticationResult result) throws SessionException
AuthenticationResult associated with this
session.result - the result to updateSessionException - if an error occurs updating the sessionboolean removeAuthenticationResult(@Nonnull AuthenticationResult result) throws SessionException
AuthenticationResult from this IdP session.result - the result to disassociateSessionException - if an error occurs accessing the session@Nonnull @NonnullElements @NotLive @Unmodifiable Set<SPSession> getSPSessions()
@Nullable SPSession getSPSession(@Nonnull@NotEmpty String serviceId)
serviceId - ID of the service@Nullable SPSession addSPSession(@Nonnull SPSession spSession) throws SessionException
spSession - the SP sessionSessionException - if an error occurs accessing the sessionboolean removeSPSession(@Nonnull SPSession spSession) throws SessionException
spSession - the SP sessionSessionException - if an error occurs accessing the SP sessionCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.