java.lang.Object
net.officefloor.web.security.scheme.AbstractMockHttpSecurityActionContext<O,F>
net.officefloor.web.security.scheme.MockHttpChallengeContext<O,F>
- All Implemented Interfaces:
ChallengeContext<O,,F> HttpChallenge,HttpChallengeContext,HttpSecurityActionContext,HttpSecurityApplicationContext<O,F>
public class MockHttpChallengeContext<O extends Enum<O>,F extends Enum<F>>
extends AbstractMockHttpSecurityActionContext<O,F>
implements ChallengeContext<O,F>, HttpChallenge
Mock
ChallengeContext for testing HttpSecuritySource
instances.- Author:
- Daniel Sagenschneider
-
Field Summary
Fields inherited from class net.officefloor.web.security.scheme.AbstractMockHttpSecurityActionContext
connection, dependencies, flows, requestState, session -
Constructor Summary
ConstructorsConstructorDescriptionInitiate.MockHttpChallengeContext(ServerHttpConnection connection) Initiate. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParameter(String name, String value) Adds a parameter to theHttpChallenge.Obtains theWWW-Authenticatechallenge.setChallenge(String authenticationScheme, String realm) Sets theHttpChallenge.Methods inherited from class net.officefloor.web.security.scheme.AbstractMockHttpSecurityActionContext
doFlow, getConnection, getObject, getQualifiedAttributeName, getRequestState, getSession, registerFlow, registerObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.officefloor.web.spi.security.HttpSecurityActionContext
getConnection, getQualifiedAttributeName, getRequestState, getSessionMethods inherited from interface net.officefloor.web.spi.security.HttpSecurityApplicationContext
doFlow, getObject
-
Constructor Details
-
MockHttpChallengeContext
Initiate.- Parameters:
connection-ServerHttpConnection.
-
MockHttpChallengeContext
public MockHttpChallengeContext()Initiate.
-
-
Method Details
-
getChallenge
Obtains theWWW-Authenticatechallenge.- Returns:
- Challenge.
-
setChallenge
Description copied from interface:HttpChallengeContextSets the
HttpChallenge.This should be used instead of directly adding the
HttpHeader, so that can potentially include multipleHttpChallengeinstances.- Specified by:
setChallengein interfaceHttpChallengeContext- Parameters:
authenticationScheme- Authentication scheme.realm- Realm.- Returns:
HttpChallenge.
-
addParameter
Description copied from interface:HttpChallengeAdds a parameter to theHttpChallenge.- Specified by:
addParameterin interfaceHttpChallenge- Parameters:
name- Parameter name.value- Parameter value.
-