Questions tagged [spring-oauth2]

Official tutorial: https://spring.io/guides/tutorials/spring-boot-oauth2/

708 questions
0
votes
2 answers

Spring Boot Social Twitter Authentication fails

I have a project on Spring Boot, in which I need to implement authorization via Twitter. What could be simpler? - I asked myself, and then I got stuck for a few days. The problem is that the most of the libraries I've tried (listening for…
0
votes
0 answers

Authenticate backend app on my spring rest api

I have a JSF app that needs to send some data to a new webservice and I thinking about, how can I authenticate my JSF app for those requests? The webservice is Spring and my first thought was OAuth2, but my JSF App has just a few calls [~4 CRUD +…
davidwillianx
  • 391
  • 2
  • 5
  • 13
0
votes
1 answer

on a 404, redirect modifying the domain name

Have the UI hosted on example.com and backend hosted on api.example.com In a specific OAuth scenario api.example.com returns a 404 for this url https://api.example.com/ng/login?error=access_denied&state=bQ9lk2# I would like to handle this 404 in…
Anand Rockzz
  • 6,072
  • 5
  • 64
  • 71
0
votes
1 answer

Spring REST with OAuth2.0 not working

I am working on Spring REST with OAuth2 integration nad below are the details : Spring : 4.3.0 Spring Security : 4.1.0 Sping OAuth : 2.3.0 JDK 1.6 Deployed in both Tomcat 7.0 and Websphere 7. I am able to deploy the project and able to access the…
0
votes
1 answer

How to take custom user details instead Principal?

I have a Spring SSO Application using my Spring OAuth2 server. This is my application.yml: security: basic: enabled: false oauth2: client: clientId: atlas clientSecret: cerberus accessTokenUri:…
Magno C
  • 1,922
  • 4
  • 28
  • 53
0
votes
1 answer

I want to used lang to mark languages.In the process of authentication,This parameter is lost

http://localhost:8080/auth/login?lang=en I want to used lang to mark languages.In the process of authentication,This parameter is lost. I read the source code. LoginUrlAuthenticationEntryPoint.commence ```java public void commence(HttpServletRequest…
0
votes
1 answer

Spring boot, Security, OAuth2: Is possible to use custom AuthorizationCodeResourceDetails? Auth server requires specific params in redirect url

I'm developing an OAuth2 Client with SpringBoot. A third-party auth server requires specific params in redirect urls. My app.yml acme: client: clientId: acme clientSecret: acmepassword accessTokenUri: …
0
votes
1 answer

share user context between interceptor and business layer in spring oauth2 (sso application)

I have a question that comes from reading a lot of examples from Spring user and oauth2 but still failing at some basic concepts, maybe someone can point me in good directions/examples or of information to read. so I'm trying to build a rest based…
Miguel Costa
  • 627
  • 1
  • 12
  • 30
0
votes
1 answer

Define different scopes and roles for different resource in Oauth Spring security

How can I define different security policies in Spring Oauth( different scopes for different resources of a client) I have looked at in the table schema of OAUTH_CLIENT_DETAILS. We can define a list of RESOURCE_IDS and list of scopes and roles. But…
0
votes
0 answers

Extract refresh token value

I wonder how can I extrat refresh token value using Spring Boot and Spring Security OAuth2? There are plans for implementing Refresh Token Repository but for now is there any easy way to intercept this value? Clarification: This is client…
0
votes
1 answer

How to call different method based on oauth authority

I want my resource to be like this. Same method mapping but each will be called based on the authority of who sent the request. Any solution for this? @RestController @RequestMapping("/test") public class TestResource { @GetMapping …
0
votes
1 answer

Unable to fetch oauth2 access_token using "password" grant_type from MongoDB after upgrading to Spring Boot 2.0.0

I recently upgraded to Spring boot 2.0.0.RELEASE from 1.5.0.RELEASE, I am using Spring oAuth2 in my project and MongoDb for databases. After the upgrade, oAuth2 stopped working which I fixed by adding "oauth2-autoconfigure". I was able to get access…
0
votes
1 answer

Invalid JWK Set Object : Spring Boot OAuth

After receiving the Access Token, I attach that in my Postman and test my sample REST API (developed in Spring Boot) running in localhost I get the below error message while doing so { "error": "server_error", "error_description": "Invalid…
Arun
  • 3,440
  • 11
  • 60
  • 108
0
votes
1 answer

Extra claim doesn't add to JWT payload by custom TokenEnhancer

I've created some TokenEnhancer to add extra claim to JWT: @Component public class TestTokenEnhancer implements TokenEnhancer { @Override public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication)…
MarkHuntDev
  • 181
  • 3
  • 21
0
votes
1 answer

JWT token in Oauth2 Spring

I have implemented JWT Token in Oauth2 Framework.I have few queries that came to my mind after the implementation which is listed as give below: 1 . Before JWT implementation, whenever user access an API in the resource server with the corresponding…
Alex Man
  • 4,746
  • 17
  • 93
  • 178