Questions tagged [spring-security-oauth2]

Spring Security's deprecated implementation of the OAuth2 spec. For OAuth2 with Spring Security 5 use Spring Security tag. We don't get many questions on OAuth 1(a) but feel free to tag them here.

Spring Security's deprecated implementation of the OAuth2 spec. The GitHub Project and the Spring Framework Website provide support for using Spring Security 4 with OAuth (1a) and OAuth2. It provides features for implementing both consumers and providers of these protocols using standard Spring and Spring Security programming models and configuration idioms.

3166 questions
1
vote
1 answer

Spring boot OAuth2 Server with AZURE B2C authentication

I am working on a Spring web application that uses Oauth2 for authentication, we have Oauth server to where the web applications redirect to and perform the form-based login. I am trying to find a way to integrate the Oauth server with Azure AD B2C…
1
vote
1 answer

refresh_token grant_type error: UserDetailsService is required. But I dont want to specify one

I'm trying to create an Oauth authentication/authorization server using spring boot and dependencies * spring-security-oauth2-autoconfigure * nimbus-jose-jwt and I'm following…
1
vote
1 answer

Spring Boot 2.2.0 Exception while calling /oauth/token API for on alternate request with same credentials

I have implemented the Oauth 2 in my project with Spring Boot starter version 2.1.9 and spring-security-oauth2-autoconfigure version 2.1.9 and everything is working great. I have upgraded the version of both Spring boot starter and…
1
vote
2 answers

How to create a user from a id_token with Spring?

I am building a SPA with a spring on the backend. I am working on signing in with Google, most of it is working already: got the id_token with the implicit flow in the frontend and I sent it and verified it on the backend. I want to have users with…
1
vote
1 answer

Using my custom External Login with spring boot oauth2 (authorization grant type)?

I have to implement Oauth2 with spring boot Oauth2 and spring boot security, but I have one problem, I want to authenticate user with my custom external login page and after login success i want to redirect again to authorization endpoint to…
1
vote
1 answer

Oauth 2.0 error when moving from Spring boot version 1.5.7 to 2.0, was working fine on 1.5.7.RELEASE

I had Oauth implemented in Spring Boot 1.5.7 but when I switched to 2 it showed me error "java.lang.IllegalArgumentException: There is no PasswordEncoder mapped for the id "null". From some research, I found that this may be an issue about password…
okaycharm
  • 41
  • 1
  • 8
1
vote
1 answer

Insteate custom OAuth2User in spring-security-oauth2 causes deserialize error

I’m using spring-security-oauth2-client in my web application. I want to use custom user type. But got error when Insteate OAuthUser using request body that authentication server sent. The reason why I use custom user type is because I want to use…
hyejin
  • 11
  • 4
1
vote
0 answers

Why Spring security redirects to http by default

I am implementing OAUTH authorization type grant flow. In local, its working fine with http protocol. But when i deployed into openshift environment , tried to hit https://_______________/oauth/authorize endpoint to get authorization code, by…
1
vote
0 answers

Spring Security redirects to login page again after successful authentication

I wrote a small spring security oauth provider(App id) spring boot starter and trying to test it https://github.com/yharish991/appid-spring-boot-starter This is how my security configuration looks like @EnableWebSecurity(debug = true) public class…
1
vote
0 answers

Spring Webflux Resource server and Oauth2

I have two separate micro-services: Authentication server and service with resources. What I need is to obtain token from Authentication server and use this token to make request to resources service (and validate it and exchange it for username).…
1
vote
0 answers

Oauth2 Client Login via Cloud Gateway gives 400 Invalid client registration id

I have a Spring Authorization/Resource server managing the authorization of a Webflux Oauth2 client. On it's own this is working OK. When I add Spring Cloud Gateway and access the Webflux via the Gateway I see that the Authorization Server validates…
1
vote
0 answers

How to use different authentication providers for different ant matchers in spring security?

I am trying to configure spring security for my application that is behind google OAuth2. The problem is that I want to whitelist certain API calls coming in from Github and Bitbucket via webhooks, for which I have written custom authentication…
coder006
  • 525
  • 1
  • 6
  • 15
1
vote
1 answer

Standalone Resource Server (Spring Boot 2 + OAuth + JWT) giving UsernameNotFoundException after Spring-boot upgrade from 1.2.x to 2.x

I have just upgraded my application from spring-boot 1.2.x to 2.x. This application is a standalone Resource Server which does not check for authentication but only checks for authorization(of the incoming requests). But since upgrade I am facing…
1
vote
2 answers

Getting error while decoding JWT generated by AWS Cognito in spring security

We have suddenly started getting below error while decoding JWT generated by AWS Cognito. Spring Security JWT { "error": "access_denied", "error_description": "Invalid token does not contain resource id (oauth2-resource)" } We re using…
Mahesh_Loya
  • 2,743
  • 3
  • 16
  • 28
1
vote
1 answer

Spring Security redirectUri for localhost is using https instead of http

I have used spring security to implement my oauth2 client. I have configured my callback as http://localhost:8080/login/oauth2/code/abc, so when I test my app in my local environment the callback is going to…
user1614862
  • 3,701
  • 7
  • 29
  • 46