Package com.hazelcast.access
Interface AccessControlService
public interface AccessControlService
Service for pluggable authentication and authorization.
-
Method Summary
Modifier and TypeMethodDescriptionString[]
Authenticates user described by givenAuthenticationContext
and returns role names assigned.boolean
isAccessGranted
(AuthorizationContext ctx, String... assignedRoles) Returnstrue
when access to resource described in theAuthorizationContext
should be granted to assigned roles.
-
Method Details
-
authenticate
Authenticates user described by givenAuthenticationContext
and returns role names assigned.- Parameters:
ctx
- authentication context- Returns:
- array of role names assigned to authenticated user
- Throws:
LoginException
- authentication fails
-
isAccessGranted
Returnstrue
when access to resource described in theAuthorizationContext
should be granted to assigned roles. The role names are typically the ones returned by theauthenticate(AuthenticationContext)
method call.- Parameters:
ctx
- authorization contextassignedRoles
- role names to be checked for access to the resource- Returns:
true
when the access is granted
-