Package dev.relism.flash.ext.security
Class SecurityIdentity
java.lang.Object
dev.relism.flash.ext.security.SecurityIdentity
The authenticated caller of the current request: the
Principal a mechanism produced, the
application user it resolves to, and the roles and scopes it holds.-
Method Summary
Modifier and TypeMethodDescriptionstatic SecurityIdentitycurrent()The caller of the request this thread is handling;nullwhen it is anonymous.booleanbooleanboolean<P extends Principal>
PThe principal astype, ornullwhen another mechanism authenticated the caller.dev.relism.flash.models.Requestrequest()The request being authorized.<U> UThe application user, resolved once per request by the configuredUserResolver.
-
Method Details
-
current
The caller of the request this thread is handling;nullwhen it is anonymous. -
principal
-
request
public dev.relism.flash.models.Request request()The request being authorized.Targetcarries whatRolesAllowed.on()names, read from path and query parameters; aRoleResolverwhose scope is somewhere else — a tenant header, say — reads it from here. -
principal
The principal astype, ornullwhen another mechanism authenticated the caller. -
user
The application user, resolved once per request by the configuredUserResolver. -
hasScope
-
hasRole
-
hasRole
-