Skip to content

OAuth2TokenValidator examples use non existing method name for creating the NimbusJwtDecoder #6925

Closed
@lgraf

Description

@lgraf

Summary

The code examples for OAuth2TokenValidator use methods that are not exist, for creating a NimbusJwtDecoder/NimbusReactiveJwtDecoder.

This effects both validator examples (JwtTimestampValidator and custom AudienceValidator) in both documentations (servlet/reactive).

I have seen that changes to this api are planned (#6010), but i think this change can be helpful in the interim. If you like i provide a PR for adjusting the docs.

Actual Behavior

The docs use the method withOidcIssuerLocation(issuerUri) which does not exists.

NimbusJwtDecoder jwtDecoder = (NimbusJwtDecoder)
        JwtDecoders.withOidcIssuerLocation(issuerUri);

Servlet - JwtTimestampValidator example
Servlet - AudienceValidator example

NimbusReactiveJwtDecoder jwtDecoder = (NimbusReactiveJwtDecoder)
             ReactiveJwtDecoders.withOidcIssuerLocation(issuerUri);

Reactive - JwtTimestampValidator example
Reactive - AudienceValidator example

Sorry for using blame links, but i can't find a way to create a link to a line in file for (rendered) .adoc files.

Expected Behavior

The docs use the method fromOidcIssuerLocation(issuerUri)

NimbusJwtDecoder jwtDecoder = (NimbusJwtDecoder)
        JwtDecoders.fromOidcIssuerLocation(issuerUri);
NimbusReactiveJwtDecoder jwtDecoder = (NimbusReactiveJwtDecoder)
             ReactiveJwtDecoders.withOidcIssuerLocation(issuerUri);

Version

5.1.5.RELEASE / master

Metadata

Metadata

Assignees

Labels

in: docsAn issue in Documentation or samplesstatus: backportedAn issue that has been backported to maintenance branches

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions