Package com.redhat.cloud.common.auth
Class RhIdSecurityContext
- java.lang.Object
-
- com.redhat.cloud.common.auth.RhIdSecurityContext
-
- All Implemented Interfaces:
javax.ws.rs.core.SecurityContext
public class RhIdSecurityContext extends Object implements javax.ws.rs.core.SecurityContext
An implementation of SecurityContext, that gets the data from the parsed x-rh-identity header.- Author:
- hrupp
-
-
Constructor Summary
Constructors Constructor Description RhIdSecurityContext(XRhIdentity rhIdentity, RhIdPrincipal rhPrincipal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthenticationScheme()PrincipalgetUserPrincipal()booleanisSecure()booleanisUserInRole(String s)
-
-
-
Constructor Detail
-
RhIdSecurityContext
public RhIdSecurityContext(XRhIdentity rhIdentity, RhIdPrincipal rhPrincipal)
-
-
Method Detail
-
getUserPrincipal
public Principal getUserPrincipal()
- Specified by:
getUserPrincipalin interfacejavax.ws.rs.core.SecurityContext
-
isUserInRole
public boolean isUserInRole(String s)
- Specified by:
isUserInRolein interfacejavax.ws.rs.core.SecurityContext
-
isSecure
public boolean isSecure()
- Specified by:
isSecurein interfacejavax.ws.rs.core.SecurityContext
-
getAuthenticationScheme
public String getAuthenticationScheme()
- Specified by:
getAuthenticationSchemein interfacejavax.ws.rs.core.SecurityContext
-
-