Package oracle.kubernetes.operator.rest
Class AuthenticationFilter
java.lang.Object
oracle.kubernetes.operator.rest.BaseDebugLoggingFilter
oracle.kubernetes.operator.rest.AuthenticationFilter
- All Implemented Interfaces:
javax.ws.rs.container.ContainerRequestFilter
@Provider @PreMatching @Priority(1000) public class AuthenticationFilter extends BaseDebugLoggingFilter implements javax.ws.rs.container.ContainerRequestFilter
AuthenticationFilter authenticates the request by extracting the access token from tha
authorization header and using it to construct a RestBackend impl for this request. It stores the
RestBackend in as a request property so that the jaxrs resource impls can call the backend to get
their work done.
The backend impl is responsible for authenticating the token (if it can't then it throws a WebApplicationException) and storing info about the authenticated user so that it can do access checks for this request later.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ACCESS_TOKEN_PREFIX
static java.lang.String
REST_BACKEND_PROPERTY
Fields inherited from class oracle.kubernetes.operator.rest.BaseDebugLoggingFilter
FILTER_REQUEST_ENTITY, FILTER_REQUEST_START_TIME
-
Constructor Summary
Constructors Constructor Description AuthenticationFilter()
Construct an AuthenticationFilter. -
Method Summary
Modifier and Type Method Description void
filter(javax.ws.rs.container.ContainerRequestContext req)
Methods inherited from class oracle.kubernetes.operator.rest.BaseDebugLoggingFilter
formatEntity, formatTime, getLoggableHeaders
-
Field Details
-
REST_BACKEND_PROPERTY
public static final java.lang.String REST_BACKEND_PROPERTY- See Also:
- Constant Field Values
-
ACCESS_TOKEN_PREFIX
public static final java.lang.String ACCESS_TOKEN_PREFIX- See Also:
- Constant Field Values
-
-
Constructor Details
-
AuthenticationFilter
public AuthenticationFilter()Construct an AuthenticationFilter.
-
-
Method Details
-
filter
public void filter(javax.ws.rs.container.ContainerRequestContext req)- Specified by:
filter
in interfacejavax.ws.rs.container.ContainerRequestFilter
-