Class DigestHttpSecuritySource
- java.lang.Object
-
- net.officefloor.web.spi.security.impl.AbstractHttpSecuritySource<HttpAuthentication<java.lang.Void>,HttpAccessControl,java.lang.Void,DigestHttpSecuritySource.Dependencies,None>
-
- net.officefloor.web.security.scheme.DigestHttpSecuritySource
-
- All Implemented Interfaces:
HttpSecuritySource<HttpAuthentication<java.lang.Void>,HttpAccessControl,java.lang.Void,DigestHttpSecuritySource.Dependencies,None>
public class DigestHttpSecuritySource extends AbstractHttpSecuritySource<HttpAuthentication<java.lang.Void>,HttpAccessControl,java.lang.Void,DigestHttpSecuritySource.Dependencies,None>
HttpSecuritySource
forDigest
HTTP security.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DigestHttpSecuritySource.Dependencies
Dependency keys.static class
DigestHttpSecuritySource.Mock
Allows mockingDigestHttpSecuritySource.SecurityState
for testing.-
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.String
AUTHENTICATION_SCHEME_DIGEST
Authentication scheme Digest.static java.lang.String
PROPERTY_PRIVATE_KEY
Name of property for the private key.static java.lang.String
PROPERTY_REALM
Name of property for the realm.protected static java.lang.String
SECURITY_STATE_SESSION_KEY
Key into theHttpSession
for theDigestHttpSecuritySource.SecurityState
.-
Fields inherited from class net.officefloor.web.spi.security.impl.AbstractHttpSecuritySource
UTF_8
-
-
Constructor Summary
Constructors Constructor Description DigestHttpSecuritySource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getOpaqueSeed()
Obtains theopaque
seed for the challenge.protected java.lang.String
getTimestamp()
Obtains the time stamp.protected void
loadMetaData(AbstractHttpSecuritySource.MetaDataContext<HttpAuthentication<java.lang.Void>,HttpAccessControl,java.lang.Void,DigestHttpSecuritySource.Dependencies,None> context)
Overridden to load meta-data.protected void
loadSpecification(AbstractHttpSecuritySource.SpecificationContext context)
Overridden to load specifications.HttpSecurity<HttpAuthentication<java.lang.Void>,HttpAccessControl,java.lang.Void,DigestHttpSecuritySource.Dependencies,None>
sourceHttpSecurity(HttpSecurityContext context)
Sources theHttpSecurity
.-
Methods inherited from class net.officefloor.web.spi.security.impl.AbstractHttpSecuritySource
getSpecification, init, start, stop
-
-
-
-
Field Detail
-
AUTHENTICATION_SCHEME_DIGEST
public static final java.lang.String AUTHENTICATION_SCHEME_DIGEST
Authentication scheme Digest.- See Also:
- Constant Field Values
-
PROPERTY_REALM
public static final java.lang.String PROPERTY_REALM
Name of property for the realm.- See Also:
- Constant Field Values
-
PROPERTY_PRIVATE_KEY
public static final java.lang.String PROPERTY_PRIVATE_KEY
Name of property for the private key.- See Also:
- Constant Field Values
-
SECURITY_STATE_SESSION_KEY
protected static final java.lang.String SECURITY_STATE_SESSION_KEY
Key into theHttpSession
for theDigestHttpSecuritySource.SecurityState
.
-
-
Method Detail
-
getTimestamp
protected java.lang.String getTimestamp()
Obtains the time stamp.- Returns:
- Time stamp.
-
getOpaqueSeed
protected java.lang.String getOpaqueSeed()
Obtains theopaque
seed for the challenge.- Returns:
opaque
seed.
-
loadSpecification
protected void loadSpecification(AbstractHttpSecuritySource.SpecificationContext context)
Description copied from class:AbstractHttpSecuritySource
Overridden to load specifications.- Specified by:
loadSpecification
in classAbstractHttpSecuritySource<HttpAuthentication<java.lang.Void>,HttpAccessControl,java.lang.Void,DigestHttpSecuritySource.Dependencies,None>
- Parameters:
context
- Specifications.
-
loadMetaData
protected void loadMetaData(AbstractHttpSecuritySource.MetaDataContext<HttpAuthentication<java.lang.Void>,HttpAccessControl,java.lang.Void,DigestHttpSecuritySource.Dependencies,None> context) throws java.lang.Exception
Description copied from class:AbstractHttpSecuritySource
Overridden to load meta-data.- Specified by:
loadMetaData
in classAbstractHttpSecuritySource<HttpAuthentication<java.lang.Void>,HttpAccessControl,java.lang.Void,DigestHttpSecuritySource.Dependencies,None>
- Parameters:
context
- Meta-data.- Throws:
java.lang.Exception
- If fails to load the meta-data.
-
sourceHttpSecurity
public HttpSecurity<HttpAuthentication<java.lang.Void>,HttpAccessControl,java.lang.Void,DigestHttpSecuritySource.Dependencies,None> sourceHttpSecurity(HttpSecurityContext context) throws HttpException
Description copied from interface:HttpSecuritySource
Sources theHttpSecurity
.- Parameters:
context
-HttpSecurity
.- Returns:
HttpSecurity
.- Throws:
HttpException
- If fails to source theHttpSecurity
.
-
-