Skip to content

Error in javadoc for oauth2ResourceServer #7670

Closed
@ah1508

Description

@ah1508

Documentation for HttpSecurity oauth2ResourceServer(Customizer<OAuth2ResourceServerConfigurer<HttpSecurity>> oauth2ResourceServerCustomizer) method is wrong :

protected void configure(HttpSecurity http) throws Exception {
	http
		.authorizeRequests(authorizeRequests ->
			authorizeRequests
				.anyRequest().authenticated()
		)
		.oauth2ResourceServer(oauth2ResourceServer ->
			oauth2ResourceServer
				.jwt(jwt ->
					jwt
						.jwtAuthenticationConverter(jwtDecoder())
				)
		);
}

@Bean
public JwtDecoder jwtDecoder() {
	return JwtDecoders.fromOidcIssuerLocation(issuerUri);
}

jwtAuthenticationConverter methd expects a converter, not a decoder.

Metadata

Metadata

Assignees

Labels

in: docsAn issue in Documentation or samplestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions