public class BasicHttpSecuritySource extends AbstractHttpSecuritySource<HttpSecurity,Void,BasicHttpSecuritySource.Dependencies,None>
HttpSecuritySource
for Basic
HTTP security.Modifier and Type | Class and Description |
---|---|
static class |
BasicHttpSecuritySource.Dependencies
Dependency 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 |
AUTHENTICATION_SCHEME_BASIC
Authentication scheme Basic.
|
static String |
PROPERTY_REALM
Name of property to retrieve the realm being secured.
|
Constructor and Description |
---|
BasicHttpSecuritySource() |
Modifier and Type | Method and Description |
---|---|
void |
authenticate(HttpAuthenticateContext<HttpSecurity,Void,BasicHttpSecuritySource.Dependencies> context)
Undertakes authentication.
|
void |
challenge(HttpChallengeContext<BasicHttpSecuritySource.Dependencies,None> context)
Triggers the authentication challenge to the client.
|
protected void |
loadMetaData(AbstractHttpSecuritySource.MetaDataContext<HttpSecurity,Void,BasicHttpSecuritySource.Dependencies,None> context)
Overridden to load meta-data.
|
protected void |
loadSpecification(AbstractHttpSecuritySource.SpecificationContext context)
Overridden to load specifications.
|
void |
logout(HttpLogoutContext<BasicHttpSecuritySource.Dependencies> context)
Logs out.
|
boolean |
ratify(HttpRatifyContext<HttpSecurity,Void> context)
Ratifies whether enough information is available to undertake
authentication.
|
getMetaData, getSpecification, init
public static final String AUTHENTICATION_SCHEME_BASIC
public static final String PROPERTY_REALM
protected void loadSpecification(AbstractHttpSecuritySource.SpecificationContext context)
AbstractHttpSecuritySource
loadSpecification
in class AbstractHttpSecuritySource<HttpSecurity,Void,BasicHttpSecuritySource.Dependencies,None>
context
- Specifications.protected void loadMetaData(AbstractHttpSecuritySource.MetaDataContext<HttpSecurity,Void,BasicHttpSecuritySource.Dependencies,None> context) throws Exception
AbstractHttpSecuritySource
loadMetaData
in class AbstractHttpSecuritySource<HttpSecurity,Void,BasicHttpSecuritySource.Dependencies,None>
context
- Meta-data.Exception
- If fails to load the meta-data.public boolean ratify(HttpRatifyContext<HttpSecurity,Void> 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,Void,BasicHttpSecuritySource.Dependencies> context) throws IOException
HttpSecuritySource
context
- HttpAuthenticateContext
.IOException
- If failure in communicating to necessary security services.public void challenge(HttpChallengeContext<BasicHttpSecuritySource.Dependencies,None> context) throws IOException
HttpSecuritySource
context
- HttpChallengeContext
.IOException
- If failure in communicating to necessary security services.public void logout(HttpLogoutContext<BasicHttpSecuritySource.Dependencies> context) throws IOException
HttpSecuritySource
context
- HttpLogoutContext
.IOException
- If failure in communicating to necessary security services.Copyright © 2005–2016. All rights reserved.