public class BearerTokenExtractor extends Object implements TokenExtractor
TokenExtractor
that strips the authenticator from a bearer token request (with an Authorization header in the
form "Bearer <TOKEN>
", or as a request parameter if that fails). The access token is the principal in
the authentication token that is extracted.Constructor and Description |
---|
BearerTokenExtractor() |
Modifier and Type | Method and Description |
---|---|
org.springframework.security.core.Authentication |
extract(javax.servlet.http.HttpServletRequest request)
Extract a token value from an incoming request without authentication.
|
protected String |
extractHeaderToken(javax.servlet.http.HttpServletRequest request)
Extract the OAuth bearer token from a header.
|
protected String |
extractToken(javax.servlet.http.HttpServletRequest request) |
public org.springframework.security.core.Authentication extract(javax.servlet.http.HttpServletRequest request)
TokenExtractor
extract
in interface TokenExtractor
request
- the current ServletRequestprotected String extractToken(javax.servlet.http.HttpServletRequest request)
protected String extractHeaderToken(javax.servlet.http.HttpServletRequest request)
request
- The request.Copyright © 2019. All rights reserved.