public class WebIdSecurityContext extends Object implements SecurityContext
Modifier and Type | Field and Description |
---|---|
static String |
ADMIN_ROLE
The admin role.
|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
Constructor and Description |
---|
WebIdSecurityContext(SecurityContext delegate,
org.eclipse.microprofile.jwt.JsonWebToken principal,
Set<String> admins)
Create a WebID-based security context.
|
Modifier and Type | Method and Description |
---|---|
String |
getAuthenticationScheme() |
Principal |
getUserPrincipal() |
boolean |
isSecure() |
boolean |
isUserInRole(String role) |
public static final String ADMIN_ROLE
public WebIdSecurityContext(SecurityContext delegate, org.eclipse.microprofile.jwt.JsonWebToken principal, Set<String> admins)
delegate
- the security context delegateprincipal
- the principaladmins
- a whitelist of admin userspublic Principal getUserPrincipal()
getUserPrincipal
in interface SecurityContext
public boolean isSecure()
isSecure
in interface SecurityContext
public String getAuthenticationScheme()
getAuthenticationScheme
in interface SecurityContext
public boolean isUserInRole(String role)
isUserInRole
in interface SecurityContext