Class MockHttpAccessControl
- java.lang.Object
-
- net.officefloor.web.security.scheme.MockHttpAccessControl
-
- All Implemented Interfaces:
java.io.Serializable
,HttpAccessControl
public class MockHttpAccessControl extends java.lang.Object implements HttpAccessControl
MockHttpAccessControl
.- Author:
- Daniel Sagenschneider
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MockHttpAccessControl(MockAccessControl accessControl)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAuthenticationScheme()
Obtains the authentication scheme used.java.security.Principal
getPrincipal()
Obtains thePrincipal
.boolean
inRole(java.lang.String role)
Indicates if within role.-
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.security.HttpAccessControl
isAccess
-
-
-
-
Constructor Detail
-
MockHttpAccessControl
public MockHttpAccessControl(MockAccessControl accessControl)
Instantiate.- Parameters:
accessControl
-MockAccessControl
.
-
-
Method Detail
-
getAuthenticationScheme
public java.lang.String getAuthenticationScheme()
Description copied from interface:HttpAccessControl
Obtains the authentication scheme used.- Specified by:
getAuthenticationScheme
in interfaceHttpAccessControl
- Returns:
- Authentication scheme.
-
getPrincipal
public java.security.Principal getPrincipal()
Description copied from interface:HttpAccessControl
Obtains thePrincipal
.- Specified by:
getPrincipal
in interfaceHttpAccessControl
- Returns:
Principal
.
-
inRole
public boolean inRole(java.lang.String role)
Description copied from interface:HttpAccessControl
Indicates if within role.- Specified by:
inRole
in interfaceHttpAccessControl
- Parameters:
role
- Role to check if have access.- Returns:
true
if supports the role.
-
-