oauth2-sso-demo | OIDC SSO Demo with Spring Boot | Security library
kandi X-RAY | oauth2-sso-demo Summary
kandi X-RAY | oauth2-sso-demo Summary
OIDC SSO Demo with Spring Boot + Spring Security + Spring Cloud Gateway
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Enhances an OAuth2 access token .
- Downloads a file from the given URL
- Configures Http Security .
- Convert a resource to a private key .
- Sets the updated information for this Todo .
- Retrieves a user by username .
- Create a new Todo entity
- Add jwt access token converter .
- Gets the token keys .
- Gets all accounts .
oauth2-sso-demo Key Features
oauth2-sso-demo Examples and Code Snippets
Community Discussions
Trending Discussions on oauth2-sso-demo
QUESTION
I have resource, authorization and _ui applications written using Spring Boot 1.5.3, OAuth2 and MongoDB.
The resources are going to be accessed from mobile apps as well as a couple of web applications (one for regular users and the other one for admins). The apps are quite similar to the samples from the guides by Dave Syer. What different is that the users are stored in the database and the clients are stored in an xml file located in the resources folder of the authorization server.
I am struggling with the logon experience for the web users. Following the guides for the JWT based OAuth app, after the login page, the user is redirected to the authorization screen, which is not the desired behavior. I.e., I don't want my authorization server to ask if the user trusts my web application to access its resources. Instead, I want users redirected to the ui pages right after login, as one would expect.
I found this project on GitHub (very similar to the apps from the guide) which behaves exactly as I want, but once I start customizing it by adding my authentication and authorization implementation, it reverts back to using the authorization screen. Apparently, I am missing something, but I was not able to figure out what exactly.
authorization/src/main/resourcs/application.yml
...ANSWER
Answered 2017-Jul-24 at 18:13From http://www.springframework.org/schema/security/spring-security-oauth2.xsd Element client-details-service > complexType client > attribute autoaprove
Scopes or scope patterns that are autoapproved (comma-separated), or just "true" to autoapprove all.
Just add the autoapprove="true"
attribute to your trusted-app in client-details.xml
. That way the authserver will not request user's confirmation to access the resources.
Here is an example of how to implement this behaviour directly in your Java configuration.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install oauth2-sso-demo
You can use oauth2-sso-demo 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 oauth2-sso-demo 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