Package org.openhab.core.io.rest.auth
Class AnonymousUserSecurityContext
java.lang.Object
org.openhab.core.io.rest.auth.AnonymousUserSecurityContext
- All Implemented Interfaces:
javax.ws.rs.core.SecurityContext
@NonNullByDefault
public class AnonymousUserSecurityContext
extends Object
implements javax.ws.rs.core.SecurityContext
This
SecurityContext
can be used to give anonymous users (i.e. unauthenticated requests) the "user" role.- Author:
- Yannick Schaus - initial contribution
-
Field Summary
Fields inherited from interface javax.ws.rs.core.SecurityContext
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable String
@Nullable Principal
boolean
isSecure()
boolean
isUserInRole
(@Nullable String role)
-
Constructor Details
-
AnonymousUserSecurityContext
public AnonymousUserSecurityContext()
-
-
Method Details
-
getUserPrincipal
- Specified by:
getUserPrincipal
in interfacejavax.ws.rs.core.SecurityContext
-
isUserInRole
- Specified by:
isUserInRole
in interfacejavax.ws.rs.core.SecurityContext
-
isSecure
public boolean isSecure()- Specified by:
isSecure
in interfacejavax.ws.rs.core.SecurityContext
-
getAuthenticationScheme
- Specified by:
getAuthenticationScheme
in interfacejavax.ws.rs.core.SecurityContext
-