Search code examples
spring-bootoauth-2.0openid-connectspring-oauth2

Extend OAuth2 Authorization Server with OpenID Connect


I'm trying to extend my home made OAuth2 Authorization Server with the OpenID Connect. At the moment, the Server works fine and successfully issues an access token.

What I need is that the token endpoint returns an id_token along with the access_token.

The Authorization Server is a Spring boot (2.5) app, which implements the authorization code flow using following oauth dependencies.

spring-security-oauth2
spring-security-oauth2-autoconfigure
spring-security-jwt
spring-security-oauth2-jose

Is there some standard way to configure an OAuth2 Spring Server so it provides the OpenID Connect features?

Thanks in advance for an example code and/or useful documenation.


Solution

  • The Spring team are working on a new OAuth server, that provides OIDC capability. It's still very early days, but it is useable.

    See here for the code, that includes a set of samples:

    https://github.com/spring-projects/spring-authorization-server