public class OAuth2SecurityChecker
extends java.lang.Object
| Constructor and Description |
|---|
OAuth2SecurityChecker() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
clientHasAnyRole(Authentication authentication,
java.lang.String... roles)
Check if the OAuth2 client has one of the specified roles.
|
boolean |
clientHasRole(Authentication authentication,
java.lang.String role)
Check if the OAuth2 client has specified role.
|
boolean |
hasAnyScope(Authentication authentication,
java.lang.String... scopes)
Check if the OAuth2 authentication has one of the specified scopes.
|
boolean |
hasScope(Authentication authentication,
java.lang.String scope)
Check if the OAuth2 authentication has one of the specified scopes.
|
boolean |
isClient(Authentication authentication)
Check if the current authentication is acting as an authenticated client application not on behalf of a user.
|
boolean |
isUser(Authentication authentication)
Check if the current authentication is acting on behalf of an authenticated user.
|
public boolean clientHasRole(Authentication authentication,
java.lang.String role)
authentication - The authentication objectrole - The role to checkpublic boolean clientHasAnyRole(Authentication authentication,
java.lang.String... roles)
authentication - The authentication objectroles - The roles to checkpublic boolean hasScope(Authentication authentication,
java.lang.String scope)
authentication - The authentication objectscope - The scope to checkpublic boolean hasAnyScope(Authentication authentication,
java.lang.String... scopes)
authentication - The authentication objectscopes - Scopes to checkpublic boolean isUser(Authentication authentication)
authentication - The authentication objectpublic boolean isClient(Authentication authentication)
authentication - The authentication objectCopyright © 2018 SAP SE. All Rights Reserved.