Class MockHttpAuthenticateContext<AC extends java.io.Serializable,O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>
- java.lang.Object
-
- net.officefloor.web.security.scheme.AbstractMockHttpSecurityActionContext<O,F>
-
- net.officefloor.web.security.scheme.MockHttpAuthenticateContext<AC,O,F>
-
- All Implemented Interfaces:
AccessControlListener<AC>,AuthenticateContext<AC,O,F>,HttpSecurityActionContext,HttpSecurityApplicationContext<O,F>
public class MockHttpAuthenticateContext<AC extends java.io.Serializable,O extends java.lang.Enum<O>,F extends java.lang.Enum<F>> extends AbstractMockHttpSecurityActionContext<O,F> implements AuthenticateContext<AC,O,F>
MockAuthenticateContextfor testingHttpSecuritySourceinstances.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from class net.officefloor.web.security.scheme.AbstractMockHttpSecurityActionContext
connection, dependencies, flows, requestState, session
-
-
Constructor Summary
Constructors Constructor Description MockHttpAuthenticateContext()Initiate with noauthorizationHttpHeader.MockHttpAuthenticateContext(java.lang.String authorizationHeaderValue)Initiate.MockHttpAuthenticateContext(ServerHttpConnection connection)Initiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccessControlChange(AC accessControl, java.lang.Throwable escalation)Notified of a change to access control.static ServerHttpConnectioncreateRequestWithAuthorizationHeader(java.lang.String authorizationHeaderValue)Creates theServerHttpConnectionwith authorizationHttpHeadervalue.ACgetAccessControl()Obtains the registered access control.java.lang.ThrowablegetEscalation()Obtains the registered escalation.-
Methods inherited from class net.officefloor.web.security.scheme.AbstractMockHttpSecurityActionContext
doFlow, getConnection, getObject, getQualifiedAttributeName, getRequestState, getSession, registerFlow, registerObject
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.web.spi.security.HttpSecurityActionContext
getConnection, getQualifiedAttributeName, getRequestState, getSession
-
Methods inherited from interface net.officefloor.web.spi.security.HttpSecurityApplicationContext
doFlow, getObject
-
-
-
-
Constructor Detail
-
MockHttpAuthenticateContext
public MockHttpAuthenticateContext()
Initiate with noauthorizationHttpHeader.
-
MockHttpAuthenticateContext
public MockHttpAuthenticateContext(java.lang.String authorizationHeaderValue)
Initiate.- Parameters:
authorizationHeaderValue-authorizationHttpHeadervalue.
-
MockHttpAuthenticateContext
public MockHttpAuthenticateContext(ServerHttpConnection connection)
Initiate.- Parameters:
connection-ServerHttpConnection.
-
-
Method Detail
-
createRequestWithAuthorizationHeader
public static ServerHttpConnection createRequestWithAuthorizationHeader(java.lang.String authorizationHeaderValue)
Creates theServerHttpConnectionwith authorizationHttpHeadervalue.- Parameters:
authorizationHeaderValue- AuthorizationHttpHeadervalue.- Returns:
ServerHttpConnection.
-
getAccessControl
public AC getAccessControl()
Obtains the registered access control.- Returns:
- Access control.
-
getEscalation
public java.lang.Throwable getEscalation()
Obtains the registered escalation.- Returns:
- Escalation.
-
accessControlChange
public void accessControlChange(AC accessControl, java.lang.Throwable escalation)
Description copied from interface:AccessControlListenerNotified of a change to access control.- Specified by:
accessControlChangein interfaceAccessControlListener<AC extends java.io.Serializable>- Parameters:
accessControl- Access control. May benullif- logging out
- failure in authenticating
escalation- PossibleEscalation. Will benullif successfully obtain access control or logout.
-
-