public abstract class AuthenticationUtilities extends Object
| Constructor and Description | 
|---|
AuthenticationUtilities()  | 
| Modifier and Type | Method and Description | 
|---|---|
static void | 
ensureOAuthScope(org.springframework.security.core.Authentication auth,
                String scope)
Makes sure the authentication contains the given scope, throws an exception otherwise 
 | 
static boolean | 
hasRole(org.springframework.security.core.Authentication auth,
       String role)  | 
static boolean | 
isAdmin(org.springframework.security.core.Authentication auth)
Check to see if the given auth object has ROLE_ADMIN assigned to it or not 
 | 
public AuthenticationUtilities()
public static void ensureOAuthScope(org.springframework.security.core.Authentication auth, String scope)
auth - the authentication object to checkscope - the scope to look fororg.springframework.security.oauth2.common.exceptions.InsufficientScopeException - if the authentication does not contain that scopepublic static boolean isAdmin(org.springframework.security.core.Authentication auth)
auth - Copyright © 2018. All rights reserved.