public final class OAuth2SecurityContext extends Object implements javax.ws.rs.core.SecurityContext
| Constructor and Description |
|---|
OAuth2SecurityContext(OAuthToken token,
Boolean isSecure)
Construct an authentication context from an OAuth token and a secure
flag.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAuthenticationScheme()
Get the authentication scheme.
|
Principal |
getUserPrincipal()
Return the current user identity.
|
boolean |
isSecure()
Was this request done via a secure request method?
|
boolean |
isUserInRole(String roleName)
WARNING: OVERLOADED TERMS
|
public OAuth2SecurityContext(OAuthToken token, Boolean isSecure)
token - The OAuth token for this principal.isSecure - Whether to secure the context.public Principal getUserPrincipal()
getUserPrincipal in interface javax.ws.rs.core.SecurityContextpublic boolean isUserInRole(String roleName)
In order to simplify the declaration of scope permissions, this method will check to see if the current user has been granted the provied "scope" rather than "role".
isUserInRole in interface javax.ws.rs.core.SecurityContextpublic boolean isSecure()
isSecure in interface javax.ws.rs.core.SecurityContextpublic String getAuthenticationScheme()
getAuthenticationScheme in interface javax.ws.rs.core.SecurityContextCopyright © 2018 krotscheck.net. All rights reserved.