Package net.officefloor.web.security
Interface HttpAccessControl
-
- All Superinterfaces:
java.io.Serializable
- All Known Subinterfaces:
JwtHttpAccessControl<C>
- All Known Implementing Classes:
AnonymousHttpSecuritySource,HttpAccessControlImpl,MockHttpAccessControl
public interface HttpAccessControl extends java.io.SerializableAdapting interface to provide standard access control by theHttpSecuritySource.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.StringgetAuthenticationScheme()Obtains the authentication scheme used.java.security.PrincipalgetPrincipal()Obtains thePrincipal.booleaninRole(java.lang.String role)Indicates if within role.default booleanisAccess(java.lang.String[] anyRoles, java.lang.String[] allRoles)Indicates if have access.
-
-
-
Method Detail
-
getAuthenticationScheme
java.lang.String getAuthenticationScheme()
Obtains the authentication scheme used.- Returns:
- Authentication scheme.
-
getPrincipal
java.security.Principal getPrincipal()
Obtains thePrincipal.- Returns:
Principal.
-
inRole
boolean inRole(java.lang.String role)
Indicates if within role.- Parameters:
role- Role to check if have access.- Returns:
trueif supports the role.
-
isAccess
default boolean isAccess(java.lang.String[] anyRoles, java.lang.String[] allRoles)Indicates if have access.- Parameters:
anyRoles- Listing of roles that must have access to at least one. May benull.allRoles- Listing of roles that must have access to all. May benull.- Returns:
trueif have access.
-
-