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 based
HttpSecuritySource.- Author:
- Daniel Sagenschneider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDependency keys.static enumFlow keys.Nested classes/interfaces inherited from class net.officefloor.web.spi.security.impl.AbstractHttpSecuritySource
AbstractHttpSecuritySource.DependencyLabeller, AbstractHttpSecuritySource.Labeller, AbstractHttpSecuritySource.MetaDataContext<A,AC extends Serializable, C, O extends Enum<O>, F extends Enum<F>>, AbstractHttpSecuritySource.SpecificationContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName ofPropertyto retrieve the realm being secured.Fields inherited from class net.officefloor.web.spi.security.impl.AbstractHttpSecuritySource
UTF_8 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected HttpAccessControlauthenticate(String userId, 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 voidOverridden 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 Details
-
PROPERTY_REALM
Name ofPropertyto retrieve the realm being secured.- See Also:
-
-
Constructor Details
-
FormHttpSecuritySource
public FormHttpSecuritySource()
-
-
Method Details
-
authenticate
protected HttpAccessControl authenticate(String userId, 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
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, throws ExceptionHttpCredentials, FormHttpSecuritySource.Dependencies, FormHttpSecuritySource.Flows> context) 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:
Exception- If fails to load the meta-data.
-
sourceHttpSecurity
public HttpSecurity<HttpAuthentication<HttpCredentials>,HttpAccessControl, sourceHttpSecurityHttpCredentials, FormHttpSecuritySource.Dependencies, FormHttpSecuritySource.Flows> (HttpSecurityContext context) throws HttpException Description copied from interface:HttpSecuritySourceSources theHttpSecurity.- Parameters:
context-HttpSecurity.- Returns:
HttpSecurity.- Throws:
HttpException- If fails to source theHttpSecurity.
-