Class MockHttpChallengeContext<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.MockHttpChallengeContext<O,F>
-
- All Implemented Interfaces:
ChallengeContext<O,F>,HttpChallenge,HttpChallengeContext,HttpSecurityActionContext,HttpSecurityApplicationContext<O,F>
public class MockHttpChallengeContext<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>> extends AbstractMockHttpSecurityActionContext<O,F> implements ChallengeContext<O,F>, HttpChallenge
MockChallengeContextfor 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 MockHttpChallengeContext()Initiate.MockHttpChallengeContext(ServerHttpConnection connection)Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(java.lang.String name, java.lang.String value)Adds a parameter to theHttpChallenge.java.lang.StringgetChallenge()Obtains theWWW-Authenticatechallenge.HttpChallengesetChallenge(java.lang.String authenticationScheme, java.lang.String realm)Sets theHttpChallenge.-
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
-
MockHttpChallengeContext
public MockHttpChallengeContext(ServerHttpConnection connection)
Initiate.- Parameters:
connection-ServerHttpConnection.
-
MockHttpChallengeContext
public MockHttpChallengeContext()
Initiate.
-
-
Method Detail
-
getChallenge
public java.lang.String getChallenge()
Obtains theWWW-Authenticatechallenge.- Returns:
- Challenge.
-
setChallenge
public HttpChallenge setChallenge(java.lang.String authenticationScheme, java.lang.String realm)
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
public void addParameter(java.lang.String name, java.lang.String value)Description copied from interface:HttpChallengeAdds a parameter to theHttpChallenge.- Specified by:
addParameterin interfaceHttpChallenge- Parameters:
name- Parameter name.value- Parameter value.
-
-