diff --git a/docs/src/docs/asciidoc/core-model-components.adoc b/docs/src/docs/asciidoc/core-model-components.adoc index d3487d15..4d1a101f 100644 --- a/docs/src/docs/asciidoc/core-model-components.adoc +++ b/docs/src/docs/asciidoc/core-model-components.adoc @@ -452,7 +452,7 @@ public OAuth2TokenCustomizer accessTokenCustomizer() { If the `OAuth2TokenGenerator` is not provided as a `@Bean` or is not configured through the `OAuth2AuthorizationServerConfigurer`, an `OAuth2TokenCustomizer` `@Bean` will automatically be configured with an `OAuth2AccessTokenGenerator`. An `OAuth2TokenCustomizer` declared with a generic type of `JwtEncodingContext` (`implements OAuth2TokenContext`) provides the ability to customize the headers and claims of a `Jwt`. -`JwtEncodingContext.getHeaders()` provides access to the `JwsHeader.Builder`, allowing the ability to add, replace, and remove headers. +`JwtEncodingContext.getJwsHeader()` provides access to the `JwsHeader.Builder`, allowing the ability to add, replace, and remove headers. `JwtEncodingContext.getClaims()` provides access to the `JwtClaimsSet.Builder`, allowing the ability to add, replace, and remove claims. The following example shows how to implement an `OAuth2TokenCustomizer` and configure it with a `JwtGenerator`: @@ -473,7 +473,7 @@ public OAuth2TokenGenerator tokenGenerator() { @Bean public OAuth2TokenCustomizer jwtCustomizer() { return context -> { - JwsHeader.Builder headers = context.getHeaders(); + JwsHeader.Builder headers = context.getJwsHeader(); JwtClaimsSet.Builder claims = context.getClaims(); if (context.getTokenType().equals(OAuth2TokenType.ACCESS_TOKEN)) { // Customize headers/claims for access_token