public interface SecurityContext
Modifier and Type | Field and Description |
---|---|
static SecurityContext |
NONE
Empty security context.
|
Modifier and Type | Method and Description |
---|---|
Principal |
getPrincipal()
Return the currently authenticated
Principal or null . |
boolean |
isUserInRole(String role)
Returns
true if the currently authenticated user is in the given
role , or false otherwise. |
static final SecurityContext NONE
Principal getPrincipal()
Principal
or null
.null
boolean isUserInRole(String role)
true
if the currently authenticated user is in the given
role
, or false otherwise.role
- name of the roletrue
if the user is in the given roleCopyright © 2018 Pivotal Software, Inc.. All rights reserved.