openid-connect-spring-client | OpenID Connect client using Spring Security | Authentication library
kandi X-RAY | openid-connect-spring-client Summary
kandi X-RAY | openid-connect-spring-client Summary
A simple demo of an OpenId Connect client using Spring Security and Spring OAuth2 to authenticate with the Google Identity Platform.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Gets the homepage page
- Gets the user info
- Get the OAuth2 access token
- Gets the email address
- Configures the HTTP security filter
- Create filter for OpenId Connects
- Sets the REST template used for OAuth2
- Configures the resources that should be ignored
- Create filter for OpenId Connects
- Sets the REST template used for OAuth2
- Handle the access token
- Returns username
- Gets the roles for this application
- Gets the REST template for the Google OpenId Connector
- Creates an OAuth 2 2
- The main application
- Returns a string representation of this object
openid-connect-spring-client Key Features
openid-connect-spring-client Examples and Code Snippets
Community Discussions
Trending Discussions on openid-connect-spring-client
QUESTION
i'm plugging a Spring security application to an IDP/OP (IDentity Provider, or Openid connect Identity Provider according to the OpenID connect terminology)
I'm using the authorization code flow. I used this implementation to start my code : https://github.com/gazbert/openid-connect-spring-client
It's working with several IDP, until i found one that requires the nonce parameter. However i could not managed to configure my application to generate a nonce, and add it in the url (I know that's the nonce because when i add it manually : it works)
It's when the application redirect the user to the IDP (authorization endpoint) that i wish to have a nonce. And it would be perfect if the nonce could be verified on the return.
I searched the web for 2 hours, i found this may be the thing to use org.springframework.security.oauth.provider.nonce but didn't found any example, or clue on how to add it in my code
Here is the interesting part of the code where i think i have to tell Spring to use the nonce :
...ANSWER
Answered 2018-Dec-05 at 01:09I struggled with this as well. Fortunately, there is some recent developments in Spring Security documentation, and after some back and forth with one of the GitHub developers, I came up with a solution in Kotlin (translating to Java should be fairly easy). The original discussion can be found here.
Ultimately, my SecurityConfig
class ended up looking like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install openid-connect-spring-client
You can use openid-connect-spring-client like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the openid-connect-spring-client component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page