Class HttpAccessControlImpl
- java.lang.Object
-
- net.officefloor.web.security.scheme.HttpAccessControlImpl
-
- All Implemented Interfaces:
java.io.Serializable
,HttpAccessControl
public class HttpAccessControlImpl extends java.lang.Object implements HttpAccessControl, java.io.Serializable
HttpAccessControl
implementation.- Author:
- Daniel Sagenschneider
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HttpAccessControlImpl(java.lang.String authenticationScheme, java.lang.String principalName, java.util.Set<java.lang.String> roles)
Initiate with simplePrincipal
.HttpAccessControlImpl(java.lang.String authenticationScheme, java.security.Principal principal, java.util.Set<java.lang.String> roles)
Initiate.
-
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
-
HttpAccessControlImpl
public HttpAccessControlImpl(java.lang.String authenticationScheme, java.security.Principal principal, java.util.Set<java.lang.String> roles)
Initiate.- Parameters:
authenticationScheme
- Authentication scheme.principal
-Principal
.roles
- Roles for the user.
-
HttpAccessControlImpl
public HttpAccessControlImpl(java.lang.String authenticationScheme, java.lang.String principalName, java.util.Set<java.lang.String> roles)
Initiate with simplePrincipal
.- Parameters:
authenticationScheme
- Authentication scheme.principalName
-Principal
name.roles
- Roles for the user.
-
-
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.
-
-