Class JwtBearerGrantRequestEntityConverter
- java.lang.Object
-
- org.springframework.security.oauth2.client.endpoint.JwtBearerGrantRequestEntityConverter
-
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<JwtBearerGrantRequest,org.springframework.http.RequestEntity<?>>
public class JwtBearerGrantRequestEntityConverter extends java.lang.Object
An implementation of anAbstractOAuth2AuthorizationGrantRequestEntityConverter
that converts the providedJwtBearerGrantRequest
to aRequestEntity
representation of an OAuth 2.0 Access Token Request for the JWT Bearer Grant.- Since:
- 5.5
- See Also:
AbstractOAuth2AuthorizationGrantRequestEntityConverter
,JwtBearerGrantRequest
,RequestEntity
, Section 2.1 Using JWTs as Authorization Grants
-
-
Constructor Summary
Constructors Constructor Description JwtBearerGrantRequestEntityConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHeadersConverter(org.springframework.core.convert.converter.Converter<T,org.springframework.http.HttpHeaders> headersConverter)
Add (compose) the providedheadersConverter
to the currentConverter
used for converting theAbstractOAuth2AuthorizationGrantRequest
instance to aHttpHeaders
used in the OAuth 2.0 Access Token Request headers.void
addParametersConverter(org.springframework.core.convert.converter.Converter<T,org.springframework.util.MultiValueMap<java.lang.String,java.lang.String>> parametersConverter)
Add (compose) the providedparametersConverter
to the currentConverter
used for converting theAbstractOAuth2AuthorizationGrantRequest
instance to aMultiValueMap
of the parameters used in the OAuth 2.0 Access Token Request body.org.springframework.http.RequestEntity<?>
convert(T authorizationGrantRequest)
protected org.springframework.util.MultiValueMap<java.lang.String,java.lang.String>
createParameters(JwtBearerGrantRequest jwtBearerGrantRequest)
void
setHeadersConverter(org.springframework.core.convert.converter.Converter<T,org.springframework.http.HttpHeaders> headersConverter)
Sets theConverter
used for converting theAbstractOAuth2AuthorizationGrantRequest
instance to aHttpHeaders
used in the OAuth 2.0 Access Token Request headers.void
setParametersConverter(org.springframework.core.convert.converter.Converter<T,org.springframework.util.MultiValueMap<java.lang.String,java.lang.String>> parametersConverter)
Sets theConverter
used for converting theAbstractOAuth2AuthorizationGrantRequest
instance to aMultiValueMap
of the parameters used in the OAuth 2.0 Access Token Request body.
-
-
-
Method Detail
-
createParameters
protected org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> createParameters(JwtBearerGrantRequest jwtBearerGrantRequest)
-
convert
public org.springframework.http.RequestEntity<?> convert(T authorizationGrantRequest)
- Specified by:
convert
in interfaceorg.springframework.core.convert.converter.Converter<T extends AbstractOAuth2AuthorizationGrantRequest,org.springframework.http.RequestEntity<?>>
-
setHeadersConverter
public final void setHeadersConverter(org.springframework.core.convert.converter.Converter<T,org.springframework.http.HttpHeaders> headersConverter)
Sets theConverter
used for converting theAbstractOAuth2AuthorizationGrantRequest
instance to aHttpHeaders
used in the OAuth 2.0 Access Token Request headers.- Parameters:
headersConverter
- theConverter
used for converting theOAuth2AuthorizationCodeGrantRequest
toHttpHeaders
-
addHeadersConverter
public final void addHeadersConverter(org.springframework.core.convert.converter.Converter<T,org.springframework.http.HttpHeaders> headersConverter)
Add (compose) the providedheadersConverter
to the currentConverter
used for converting theAbstractOAuth2AuthorizationGrantRequest
instance to aHttpHeaders
used in the OAuth 2.0 Access Token Request headers.- Parameters:
headersConverter
- theConverter
to add (compose) to the currentConverter
used for converting theOAuth2AuthorizationCodeGrantRequest
to aHttpHeaders
-
setParametersConverter
public final void setParametersConverter(org.springframework.core.convert.converter.Converter<T,org.springframework.util.MultiValueMap<java.lang.String,java.lang.String>> parametersConverter)
Sets theConverter
used for converting theAbstractOAuth2AuthorizationGrantRequest
instance to aMultiValueMap
of the parameters used in the OAuth 2.0 Access Token Request body.- Parameters:
parametersConverter
- theConverter
used for converting theOAuth2AuthorizationCodeGrantRequest
to aMultiValueMap
of the parameters
-
addParametersConverter
public final void addParametersConverter(org.springframework.core.convert.converter.Converter<T,org.springframework.util.MultiValueMap<java.lang.String,java.lang.String>> parametersConverter)
Add (compose) the providedparametersConverter
to the currentConverter
used for converting theAbstractOAuth2AuthorizationGrantRequest
instance to aMultiValueMap
of the parameters used in the OAuth 2.0 Access Token Request body.- Parameters:
parametersConverter
- theConverter
to add (compose) to the currentConverter
used for converting theOAuth2AuthorizationCodeGrantRequest
to aMultiValueMap
of the parameters
-
-