Interface NormalizedAuthentication
- All Superinterfaces:
org.springframework.security.core.Authentication,Principal,Serializable
- All Known Subinterfaces:
LdaptiveAuthentication
- All Known Implementing Classes:
LdaptiveAuthenticationToken,LdaptiveRememberMeAuthenticationToken,NormalizedJwtAuthenticationToken,NormalizedUsernamePasswordAuthenticationToken
public interface NormalizedAuthentication
extends org.springframework.security.core.Authentication
The normalized authentication token.
- Author:
- Christian Bremer
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.security.core.Authentication
org.springframework.security.core.Authentication.Builder<B extends org.springframework.security.core.Authentication.Builder<B>> -
Method Summary
Modifier and TypeMethodDescriptionGets granted authority names.Gets group names.default @NonNull Collection<Group> Gets groups.Returns the normalized principal.default booleanhasAnyGrantedAuthority(@Nullable String... authorities) Has any granted authority.default booleanhasAnyGrantedAuthority(@Nullable Collection<String> authorities) Has any granted authority.default booleanhasGrantedAuthority(@Nullable String authority) Has granted authority.default booleanisInAnyGroup(@Nullable String... groupNames) Is in any group.default booleanisInAnyGroup(@Nullable Collection<String> groupNames) Is in any group.default booleanIs in group.Methods inherited from interface org.springframework.security.core.Authentication
getAuthorities, getCredentials, getDetails, isAuthenticated, setAuthenticated, toBuilder
-
Method Details
-
getPrincipal
NormalizedPrincipal getPrincipal()Returns the normalized principal.- Specified by:
getPrincipalin interfaceorg.springframework.security.core.Authentication- Returns:
- the normalized principal
-
getGrantedAuthorityNames
Gets granted authority names.- Returns:
- the granted authority names
-
getGroups
Gets groups.- Returns:
- the groups
-
getGroupNames
Gets group names.- Returns:
- the group names
-
hasGrantedAuthority
Has granted authority.- Parameters:
authority- the authority- Returns:
- the boolean
-
hasAnyGrantedAuthority
Has any granted authority.- Parameters:
authorities- the authorities- Returns:
- the boolean
-
hasAnyGrantedAuthority
Has any granted authority.- Parameters:
authorities- the authorities- Returns:
- the boolean
-
isInGroup
Is in group.- Parameters:
groupName- the group name- Returns:
- the boolean
-
isInAnyGroup
Is in any group.- Parameters:
groupNames- the group names- Returns:
- the boolean
-
isInAnyGroup
Is in any group.- Parameters:
groupNames- the group names- Returns:
- the boolean
-