Top Description Fields Constructors Methods
io.undertow.security.impl

public Class CachedAuthenticatedSessionMechanism

extends Object
implements AuthenticationMechanism
Class Inheritance
All Implemented Interfaces
io.undertow.security.api.AuthenticationMechanism
Imports
io.undertow.security.api.AuthenticatedSessionManager, .AuthenticatedSessionManager.AuthenticatedSession, .AuthenticationMechanism, .SecurityContext, io.undertow.security.idm.Account, .IdentityManager, io.undertow.server.HttpServerExchange

An AuthenticationMechanism which uses any cached AuthenticatedSessions.
Author
Darran Lofthouse

Field Summary

Modifier and TypeField and Description
private final IdentityManager

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public AuthenticationMechanism.AuthenticationMechanismOutcome
authenticate(HttpServerExchange
The exchange
exchange
,
SecurityContext securityContext)

Implements io.undertow.security.api.AuthenticationMechanism.authenticate.

Perform authentication of the request.

private IdentityManager
public AuthenticationMechanism.AuthenticationMechanismOutcome
runCached(final HttpServerExchange exchange, final SecurityContext securityContext, final AuthenticatedSessionManager sessionManager)

public AuthenticationMechanism.ChallengeResult
sendChallenge(HttpServerExchange
The exchange
exchange
,
SecurityContext
The security context
securityContext
)

Implements io.undertow.security.api.AuthenticationMechanism.sendChallenge.

Send an authentication challenge to the remote client.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

identityManagerback to summary
private final IdentityManager identityManager

Constructor Detail

CachedAuthenticatedSessionMechanismback to summary
public CachedAuthenticatedSessionMechanism()
CachedAuthenticatedSessionMechanismback to summary
public CachedAuthenticatedSessionMechanism(final IdentityManager identityManager)

Method Detail

authenticateback to summary
public AuthenticationMechanism.AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange, SecurityContext securityContext)

Implements io.undertow.security.api.AuthenticationMechanism.authenticate.

Doc from io.undertow.security.api.AuthenticationMechanism.authenticate.

Perform authentication of the request. Any potentially blocking work should be performed in the handoff executor provided

Parameters
exchange:HttpServerExchange

The exchange

Annotations
@Override
getIdentityManagerback to summary
private IdentityManager getIdentityManager(SecurityContext securityContext)
Annotations
@SuppressWarnings:deprecation
runCachedback to summary
public AuthenticationMechanism.AuthenticationMechanismOutcome runCached(final HttpServerExchange exchange, final SecurityContext securityContext, final AuthenticatedSessionManager sessionManager)
sendChallengeback to summary
public AuthenticationMechanism.ChallengeResult sendChallenge(HttpServerExchange exchange, SecurityContext securityContext)

Implements io.undertow.security.api.AuthenticationMechanism.sendChallenge.

Doc from io.undertow.security.api.AuthenticationMechanism.sendChallenge.

Send an authentication challenge to the remote client.

The individual mechanisms should update the response headers and body of the message as appropriate however they should not set the response code, instead that should be indicated in the ChallengeResult and the most appropriate overall response code will be selected. This method should not return null.

Parameters
exchange:HttpServerExchange

The exchange

securityContext:SecurityContext

The security context

Returns:AuthenticationMechanism.ChallengeResult

A ChallengeResult indicating if a challenge was sent and the desired response code.

Annotations
@Override