Package org.trellisldp.oauth
Class OAuthFilter
- java.lang.Object
-
- org.trellisldp.oauth.OAuthFilter
-
- All Implemented Interfaces:
ContainerRequestFilter
@Provider @Priority(1000) public class OAuthFilter extends Object implements ContainerRequestFilter
An OAuth authentication filter that processes JWT-based Bearer tokens from an Authorization HTTP header.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONFIG_AUTH_ADMIN_USERS
The configuration key controlling the list of of admin WebID values.static String
CONFIG_AUTH_OAUTH_JWK_URL
The configuration key controlling the OAuth JWK URL.static String
CONFIG_AUTH_OAUTH_KEYSTORE_CREDENTIALS
The configuration key controlling the OAuth Keystore credentials.static String
CONFIG_AUTH_OAUTH_KEYSTORE_IDS
The configuration key controlling the OAuth Keystore ids.static String
CONFIG_AUTH_OAUTH_KEYSTORE_PATH
The configuration key controlling the OAuth Keystore path.static String
CONFIG_AUTH_OAUTH_SHARED_SECRET
The configuration key controlling the OAuth HMAC shared secret.static String
CONFIG_AUTH_REALM
The configuration key controlling the realm used in a WWW-Authenticate header, or 'trellis' by default.static String
SCHEME
The authentication scheme used by this module.
-
Constructor Summary
Constructors Constructor Description OAuthFilter()
Create an OAuth filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
filter(ContainerRequestContext requestContext)
void
setAdmins(Set<String> admins)
Set the admin users.void
setAuthenticator(Authenticator authenticator)
Set the authenticator to use.void
setChallenge(String challenge)
Set the challenge text.
-
-
-
Field Detail
-
CONFIG_AUTH_ADMIN_USERS
public static final String CONFIG_AUTH_ADMIN_USERS
The configuration key controlling the list of of admin WebID values.- See Also:
- Constant Field Values
-
CONFIG_AUTH_REALM
public static final String CONFIG_AUTH_REALM
The configuration key controlling the realm used in a WWW-Authenticate header, or 'trellis' by default.- See Also:
- Constant Field Values
-
CONFIG_AUTH_OAUTH_KEYSTORE_PATH
public static final String CONFIG_AUTH_OAUTH_KEYSTORE_PATH
The configuration key controlling the OAuth Keystore path.- See Also:
- Constant Field Values
-
CONFIG_AUTH_OAUTH_KEYSTORE_CREDENTIALS
public static final String CONFIG_AUTH_OAUTH_KEYSTORE_CREDENTIALS
The configuration key controlling the OAuth Keystore credentials.- See Also:
- Constant Field Values
-
CONFIG_AUTH_OAUTH_KEYSTORE_IDS
public static final String CONFIG_AUTH_OAUTH_KEYSTORE_IDS
The configuration key controlling the OAuth Keystore ids.- See Also:
- Constant Field Values
-
CONFIG_AUTH_OAUTH_SHARED_SECRET
public static final String CONFIG_AUTH_OAUTH_SHARED_SECRET
The configuration key controlling the OAuth HMAC shared secret.- See Also:
- Constant Field Values
-
CONFIG_AUTH_OAUTH_JWK_URL
public static final String CONFIG_AUTH_OAUTH_JWK_URL
The configuration key controlling the OAuth JWK URL.- See Also:
- Constant Field Values
-
SCHEME
public static final String SCHEME
The authentication scheme used by this module.- See Also:
- Constant Field Values
-
-
Method Detail
-
setAuthenticator
public void setAuthenticator(Authenticator authenticator)
Set the authenticator to use.- Parameters:
authenticator
- the authenticator in use
-
setChallenge
public void setChallenge(String challenge)
Set the challenge text.- Parameters:
challenge
- the challenge text
-
setAdmins
public void setAdmins(Set<String> admins)
Set the admin users.- Parameters:
admins
- the admin users
-
filter
public void filter(ContainerRequestContext requestContext)
- Specified by:
filter
in interfaceContainerRequestFilter
-
-