Class LoginAuthenticator
java.lang.Object
org.eclipse.jetty.security.authentication.LoginAuthenticator
- All Implemented Interfaces:
Authenticator
- Direct Known Subclasses:
BasicAuthenticator
,DigestAuthenticator
,FormAuthenticator
,JaspiAuthenticator
,OpenIdAuthenticator
,SPNEGOAuthenticator
,SslClientCertAuthenticator
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
This Authentication represents a just completed authentication, that has sent a response, typically to redirect the client to the original request target..static class
Base class for representing a successful authentication state.Nested classes/interfaces inherited from interface org.eclipse.jetty.security.Authenticator
Authenticator.Configuration, Authenticator.Factory, Authenticator.NoOp
-
Field Summary
Fields inherited from interface org.eclipse.jetty.security.Authenticator
BASIC_AUTH, CERT_AUTH, CERT_AUTH2, DIGEST_AUTH, FORM_AUTH, NEGOTIATE_AUTH, OPENID_AUTH, SPNEGO_AUTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionIf the UserIdentity returned fromLoginService.login(String, Object, Request, Function)
is not null, it is assumed that the user is fully authenticated and we need to change the session id to prevent session fixation vulnerability.void
void
setConfiguration
(Authenticator.Configuration configuration) Configure the Authenticatorprotected void
updateSession
(Request httpRequest, Response httpResponse) Update the session on authentication.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.security.Authenticator
getAuthenticationType, getConstraintAuthentication, prepareRequest, validateRequest
-
Field Details
-
_loginService
-
_identityService
-
-
Constructor Details
-
LoginAuthenticator
protected LoginAuthenticator()
-
-
Method Details
-
login
If the UserIdentity returned fromLoginService.login(String, Object, Request, Function)
is not null, it is assumed that the user is fully authenticated and we need to change the session id to prevent session fixation vulnerability. If the UserIdentity is not necessarily fully authenticated, then subclasses must override this method and determine when the UserIdentity IS fully authenticated and renew the session id.- Parameters:
username
- the username of the client to be authenticatedpassword
- the user's credentialrequest
- the inbound request that needs authentication
-
logout
-
setConfiguration
Description copied from interface:Authenticator
Configure the Authenticator- Specified by:
setConfiguration
in interfaceAuthenticator
- Parameters:
configuration
- the configuration
-
getLoginService
-
updateSession
Update the session on authentication. The session is changed to a new instance with a new ID if and only if:- A session exists.
- The
Authenticator.Configuration.isSessionRenewedOnAuthentication()
returns true. - The session ID has been given to unauthenticated responses
- Parameters:
httpRequest
- the requesthttpResponse
- the response- See Also:
-