You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure whether I should mark this as a feature request or a bug request. I'm also not sure if I a missing something. As this is a new feature, I am trying to figure out how this is done correctly.
Describe the bug
When looking at the openid-configuration document, the userinfo endpoint is not present.
To Reproduce
I've enabled the user info as described in OidcUserInfoTests.java. Specifically:
@Bean
@Order(Ordered.HIGHEST_PRECEDENCE)
public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity http, CorsConfigurationSource corsConfigurationSource) throws Exception {
final OAuth2AuthorizationServerConfigurer<HttpSecurity> authorizationServerConfigurer =
new OAuth2AuthorizationServerConfigurer<>();
authorizationServerConfigurer
.authorizationEndpoint(authorizationEndpoint ->
authorizationEndpoint.consentPage(CUSTOM_CONSENT_PAGE_URI)
);
final RequestMatcher endpointsMatcher = authorizationServerConfigurer
.getEndpointsMatcher();
// Custom User Info Mapper that retrieves claims from a signed JWT
final Function<OidcUserInfoAuthenticationContext, OidcUserInfo> userInfoMapper = context -> {
OidcUserInfoAuthenticationToken authentication = context.getAuthentication();
JwtAuthenticationToken principal = (JwtAuthenticationToken) authentication.getPrincipal();
return new OidcUserInfo(principal.getToken().getClaims());
};
http
.cors().configurationSource(corsConfigurationSource)
.and()
.requestMatcher(endpointsMatcher)
.authorizeRequests(authorizeRequests ->
authorizeRequests.anyRequest().authenticated()
)
.csrf(csrf -> csrf.ignoringRequestMatchers(endpointsMatcher))
.oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt)
.apply(authorizationServerConfigurer)
.oidc(oidc -> oidc
.userInfoEndpoint(userInfo -> userInfo
.userInfoMapper(userInfoMapper)
)
);
return http.build();
}
Expected behavior
The /userinfo endpoint should be present under the openid_configuration document for external libraries to consume.
The text was updated successfully, but these errors were encountered:
@bjornharvold, thanks for your interest in the project! I believe this is a duplicate of #488 (though the description does not mention openid-configuration specifically). I'm going to close this as a duplicate for now, but let me know if you feel I've missed anything.
I'm not sure whether I should mark this as a feature request or a bug request. I'm also not sure if I a missing something. As this is a new feature, I am trying to figure out how this is done correctly.
Describe the bug
When looking at the openid-configuration document, the userinfo endpoint is not present.
To Reproduce
I've enabled the user info as described in OidcUserInfoTests.java. Specifically:
Expected behavior
The /userinfo endpoint should be present under the openid_configuration document for external libraries to consume.
The text was updated successfully, but these errors were encountered: