Skip to content

Commit f413ee9

Browse files
committed
Merge branch '0.4.x' into 1.0.x
Closes gh-1392
2 parents ec32aa9 + c7c75b5 commit f413ee9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/docs/asciidoc/core-model-components.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ public OAuth2TokenCustomizer<OAuth2TokenClaimsContext> accessTokenCustomizer() {
452452
If the `OAuth2TokenGenerator` is not provided as a `@Bean` or is not configured through the `OAuth2AuthorizationServerConfigurer`, an `OAuth2TokenCustomizer<OAuth2TokenClaimsContext>` `@Bean` will automatically be configured with an `OAuth2AccessTokenGenerator`.
453453

454454
An `OAuth2TokenCustomizer<JwtEncodingContext>` declared with a generic type of `JwtEncodingContext` (`implements OAuth2TokenContext`) provides the ability to customize the headers and claims of a `Jwt`.
455-
`JwtEncodingContext.getHeaders()` provides access to the `JwsHeader.Builder`, allowing the ability to add, replace, and remove headers.
455+
`JwtEncodingContext.getJwsHeader()` provides access to the `JwsHeader.Builder`, allowing the ability to add, replace, and remove headers.
456456
`JwtEncodingContext.getClaims()` provides access to the `JwtClaimsSet.Builder`, allowing the ability to add, replace, and remove claims.
457457

458458
The following example shows how to implement an `OAuth2TokenCustomizer<JwtEncodingContext>` and configure it with a `JwtGenerator`:
@@ -473,7 +473,7 @@ public OAuth2TokenGenerator<?> tokenGenerator() {
473473
@Bean
474474
public OAuth2TokenCustomizer<JwtEncodingContext> jwtCustomizer() {
475475
return context -> {
476-
JwsHeader.Builder headers = context.getHeaders();
476+
JwsHeader.Builder headers = context.getJwsHeader();
477477
JwtClaimsSet.Builder claims = context.getClaims();
478478
if (context.getTokenType().equals(OAuth2TokenType.ACCESS_TOKEN)) {
479479
// Customize headers/claims for access_token

0 commit comments

Comments
 (0)