Reputation: 111
Is it possible in Spring Authorization Server version 1.0.1 to use the oidcClientRegistrationEndpoint?
Is there anyone who knows where a good example can be found.
Thanks
Willy De Keyser
I tried the following code but get an error message not found, I think the endpoint does not exist.
@Bean
AuthorizationServerSettings authorizationServerSettings() {
return AuthorizationServerSettings.builder()
.issuer("http://localhost:9000")
.authorizationEndpoint("/oauth2/authorize")
.tokenEndpoint("/oauth2/token")
.tokenIntrospectionEndpoint("/oauth2/introspect")
.tokenRevocationEndpoint("/oauth2/revoke")
.jwkSetEndpoint("/oauth2/jwks")
.oidcUserInfoEndpoint("/userinfo")
.oidcClientRegistrationEndpoint("/connect/register")
.build();
}
Upvotes: 0
Views: 451
Reputation: 6158
It is not enabled by default. You can enable the endpoint via:
@Bean
public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity http) throws Exception {
OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(http);
http.getConfigurer(OAuth2AuthorizationServerConfigurer.class)
.oidc(oidc -> oidc
.clientRegistrationEndpoint(Customizer.withDefaults())
);
return http.build();
}
See OpenID Connect 1.0 Client Registration Endpoint in the reference for more information.
Upvotes: 0