public class FormHttpSecuritySource extends AbstractHttpSecuritySource<HttpSecurity,HttpCredentials,FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows>
HttpSecuritySource
.Modifier and Type | Class and Description |
---|---|
static class |
FormHttpSecuritySource.Dependencies
Dependency keys.
|
static class |
FormHttpSecuritySource.Flows
Flow keys.
|
AbstractHttpSecuritySource.DependencyLabeller, AbstractHttpSecuritySource.Labeller, AbstractHttpSecuritySource.MetaDataContext<S,C,D extends Enum<D>,F extends Enum<F>>, AbstractHttpSecuritySource.SpecificationContext
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_REALM
Name of property to retrieve the realm being secured.
|
Constructor and Description |
---|
FormHttpSecuritySource() |
getMetaData, getSpecification, init
public static final String PROPERTY_REALM
protected HttpSecurity authenticate(String userId, String realm, byte[] password, CredentialStore store) throws IOException
Undertakes the authentication.
This is separated out so that may be overridden to provide differing means for authentication.
userId
- Identifier for the user.realm
- Security realm.password
- Password.store
- CredentialStore
.HttpSecurity
or null
if not authenticated.IOException
- If fails communication with the CredentialStore
.protected void loadSpecification(AbstractHttpSecuritySource.SpecificationContext context)
AbstractHttpSecuritySource
loadSpecification
in class AbstractHttpSecuritySource<HttpSecurity,HttpCredentials,FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows>
context
- Specifications.protected void loadMetaData(AbstractHttpSecuritySource.MetaDataContext<HttpSecurity,HttpCredentials,FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows> context) throws Exception
AbstractHttpSecuritySource
loadMetaData
in class AbstractHttpSecuritySource<HttpSecurity,HttpCredentials,FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows>
context
- Meta-data.Exception
- If fails to load the meta-data.public boolean ratify(HttpRatifyContext<HttpSecurity,HttpCredentials> context)
HttpSecuritySource
Ratifies whether enough information is available to undertake authentication.
As authentication will likely require communication with external
services (LDAP store, database, etc), this method allows checking whether
enough information is available to undertake the authentication. The
purpose is to avoid the Job
depending on
HttpAuthentication
and inherit the dependencies of authentication
subsequently causing execution by the authentication Team
-
especially as the majority of HttpRequest
servicing will have the
HTTP security cached in the HttpSession
and not require the
authentication dependencies causing the swap in Team
.
context
- HttpRatifyContext
.true
should enough information be available to
undertake authentication. false
if not enough
information is available for authentication.public void authenticate(HttpAuthenticateContext<HttpSecurity,HttpCredentials,FormHttpSecuritySource.Dependencies> context) throws IOException
HttpSecuritySource
context
- HttpAuthenticateContext
.IOException
- If failure in communicating to necessary security services.public void challenge(HttpChallengeContext<FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows> context) throws IOException
HttpSecuritySource
context
- HttpChallengeContext
.IOException
- If failure in communicating to necessary security services.public void logout(HttpLogoutContext<FormHttpSecuritySource.Dependencies> context) throws IOException
HttpSecuritySource
context
- HttpLogoutContext
.IOException
- If failure in communicating to necessary security services.Copyright © 2005–2016. All rights reserved.