Class FormHttpSecuritySource
- java.lang.Object
-
- net.officefloor.web.spi.security.impl.AbstractHttpSecuritySource<HttpAuthentication<HttpCredentials>,HttpAccessControl,HttpCredentials,FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows>
-
- net.officefloor.web.security.scheme.FormHttpSecuritySource
-
- All Implemented Interfaces:
HttpSecuritySource<HttpAuthentication<HttpCredentials>,HttpAccessControl,HttpCredentials,FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows>
public class FormHttpSecuritySource extends AbstractHttpSecuritySource<HttpAuthentication<HttpCredentials>,HttpAccessControl,HttpCredentials,FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows>
Form basedHttpSecuritySource.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFormHttpSecuritySource.DependenciesDependency keys.static classFormHttpSecuritySource.FlowsFlow keys.-
Nested classes/interfaces inherited from class net.officefloor.web.spi.security.impl.AbstractHttpSecuritySource
AbstractHttpSecuritySource.DependencyLabeller, AbstractHttpSecuritySource.Labeller, AbstractHttpSecuritySource.MetaDataContext<A,AC extends java.io.Serializable,C,O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>, AbstractHttpSecuritySource.SpecificationContext
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROPERTY_REALMName ofPropertyto retrieve the realm being secured.-
Fields inherited from class net.officefloor.web.spi.security.impl.AbstractHttpSecuritySource
UTF_8
-
-
Constructor Summary
Constructors Constructor Description FormHttpSecuritySource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected HttpAccessControlauthenticate(java.lang.String userId, java.lang.String realm, byte[] password, CredentialStore store)Undertakes the authentication.protected voidloadMetaData(AbstractHttpSecuritySource.MetaDataContext<HttpAuthentication<HttpCredentials>,HttpAccessControl,HttpCredentials,FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows> context)Overridden to load meta-data.protected voidloadSpecification(AbstractHttpSecuritySource.SpecificationContext context)Overridden to load specifications.HttpSecurity<HttpAuthentication<HttpCredentials>,HttpAccessControl,HttpCredentials,FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows>sourceHttpSecurity(HttpSecurityContext context)Sources theHttpSecurity.-
Methods inherited from class net.officefloor.web.spi.security.impl.AbstractHttpSecuritySource
getSpecification, init, start, stop
-
-
-
-
Field Detail
-
PROPERTY_REALM
public static final java.lang.String PROPERTY_REALM
Name ofPropertyto retrieve the realm being secured.- See Also:
- Constant Field Values
-
-
Method Detail
-
authenticate
protected HttpAccessControl authenticate(java.lang.String userId, java.lang.String realm, byte[] password, CredentialStore store) throws HttpException
Undertakes the authentication.
This is separated out so that may be overridden to provide differing means for authentication.
- Parameters:
userId- Identifier for the user.realm- Security realm.password- Password.store-CredentialStore.- Returns:
HttpAccessControlornullif not authenticated.- Throws:
HttpException- If fails communication with theCredentialStore.
-
loadSpecification
protected void loadSpecification(AbstractHttpSecuritySource.SpecificationContext context)
Description copied from class:AbstractHttpSecuritySourceOverridden to load specifications.- Specified by:
loadSpecificationin classAbstractHttpSecuritySource<HttpAuthentication<HttpCredentials>,HttpAccessControl,HttpCredentials,FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows>- Parameters:
context- Specifications.
-
loadMetaData
protected void loadMetaData(AbstractHttpSecuritySource.MetaDataContext<HttpAuthentication<HttpCredentials>,HttpAccessControl,HttpCredentials,FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows> context) throws java.lang.Exception
Description copied from class:AbstractHttpSecuritySourceOverridden to load meta-data.- Specified by:
loadMetaDatain classAbstractHttpSecuritySource<HttpAuthentication<HttpCredentials>,HttpAccessControl,HttpCredentials,FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows>- Parameters:
context- Meta-data.- Throws:
java.lang.Exception- If fails to load the meta-data.
-
sourceHttpSecurity
public HttpSecurity<HttpAuthentication<HttpCredentials>,HttpAccessControl,HttpCredentials,FormHttpSecuritySource.Dependencies,FormHttpSecuritySource.Flows> sourceHttpSecurity(HttpSecurityContext context) throws HttpException
Description copied from interface:HttpSecuritySourceSources theHttpSecurity.- Parameters:
context-HttpSecurity.- Returns:
HttpSecurity.- Throws:
HttpException- If fails to source theHttpSecurity.
-
-