public final class CustomBearerTokenResolver extends Object implements org.springframework.security.oauth2.server.resource.web.BearerTokenResolver
token处理策略
在ResourceAuthorizeProvider中被配置为token处理方式Constructor and Description |
---|
CustomBearerTokenResolver() |
Modifier and Type | Method and Description |
---|---|
String |
resolve(javax.servlet.http.HttpServletRequest request) |
void |
setAllowFormEncodedBodyParameter(boolean allowFormEncodedBodyParameter)
Set if transport of access token using form-encoded body parameter is
supported.
|
void |
setAllowUriQueryParameter(boolean allowUriQueryParameter)
Set if transport of access token using URI query parameter is supported.
|
public String resolve(javax.servlet.http.HttpServletRequest request)
resolve
in interface org.springframework.security.oauth2.server.resource.web.BearerTokenResolver
public void setAllowFormEncodedBodyParameter(boolean allowFormEncodedBodyParameter)
false
.allowFormEncodedBodyParameter
- if the form-encoded body parameter is
supportedpublic void setAllowUriQueryParameter(boolean allowUriQueryParameter)
false
.
The spec recommends against using this mechanism for sending bearer tokens,
and even goes as far as stating that it was only included for completeness.allowUriQueryParameter
- if the URI query parameter is supportedCopyright © 2021. All rights reserved.