Search code examples
oauth-2.0openid-connectimplicit-flowimplicit-grant

Sample Code for OIDC Implicit Code Flow in Java


I am new to implicit flow using OIDC and I am looking for sample code. I could not find anything on internet. Can someone provide links to sample code anywhere.

Any help is really appreciated.


Solution

  • Switching from code flow to implicit flow usually just means changing response_type parameter in your authorization request to token instead of code (or id_token token if you also want the ID token). Then you read the token directly from the response from the Authorization Server (no need to exchange code for token). This should relatively simple to achieve with any OIDC client library, or even just a HTTP client.

    Take any OIDC client and change the response_type parameter used by it. If you run any concrete problems I'll be glad to help.