Official tutorial: https://spring.io/guides/tutorials/spring-boot-oauth2/
Questions tagged [spring-oauth2]
708 questions
6
votes
0 answers
Multiple resource server oauth2 clients? Spring OAuth2 SSO
Good day,
I have setup a working example implementing SSO & the API Gateway pattern (similar to what is described here…

Roscoe Lotriet
- 101
- 1
- 8
6
votes
0 answers
Spring OAuth 2.0 - Unit Testing OAuth 2.0 client configuration (AuthorizationCodeResourceDetails)
I am using the spring-oauth 2.0 library to create an OAuth 2.0 client that I can use to obtain and access token from a running OAuth 2.0 authorization server. The client configuration is given…

sunsin1985
- 2,437
- 5
- 22
- 27
6
votes
1 answer
Is There an Easier Way to Load Spring OAuth Client Configuration
I'm working on a little proof of concept for a set of endpoints that need to be able to call each other passing tokens which are obtained via an OAuth 2 client credentials flow. I'm using Spring Boot and related projects to build these endpoints,…

Shaun
- 2,446
- 19
- 33
5
votes
2 answers
spring-security-oauth2-authorization-server:0.1.1 get token error invalid_client
i'm using spring authorization server, but i cannot get token.
This is my code and example. pls help me know correct request
@Bean
public RegisteredClientRepository registeredClientRepository() {
RegisteredClient registeredClient =…

Loi Nguyen Tri
- 117
- 9
5
votes
2 answers
An expected CSRF token cannot be found
I'm trying to disable Spring security into latest Spring Cloud using this configuration:
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(securedEnabled = true)
@Order(SecurityProperties.DEFAULT_FILTER_ORDER)
public class…

Peter Penzov
- 1,126
- 134
- 430
- 808
5
votes
2 answers
How to ensure make my custom OidcUserService called over the default?
tl;dr: why isn't my OidcUserService despite being registered?
I am trying to use my own OAuth2UserService by registering it as documented in the Spring Security documentation.
However, when I put a breakpoint on the…

Sled
- 18,541
- 27
- 119
- 168
5
votes
1 answer
resolve [authorization_request_not_found] when using oauth2-client as implicit grant-type
i'am getting OAuth2AuthorizationException:[authorization_request_not_found]
when trying to replace authorization-grant-type from authorization_code to implicit
spring:
security:
oauth2:
client:
registration:
…

ashraf revo
- 767
- 2
- 12
- 24
5
votes
1 answer
Spring OAuth2 XML configuration for Client and Resource Server
Can any one help me with a very basic configuration in XML to act my spring application as OAuth2/OIDC Resource serer and as well as cilent.
What I have?
A Spring Web MVC application with Spring Secuirity LDAP authentication.
What I want to…

Agam
- 1,015
- 2
- 11
- 21
5
votes
2 answers
Getting 404 after oauth2 authentication success and an anonymous token
I am using oauth2 with springboot 1.5.6.RELEASE and I am using jdbc authentication with oauth2.
I added the property: security.oauth2.resource.filter-order = 3
1- AuthorizationServerConfigurerAdapter:
@Configuration
@EnableAuthorizationServer
public…

Mahmoud Saleh
- 33,303
- 119
- 337
- 498
5
votes
0 answers
Spring OAuth2: can't get additional information from ClientDetailsService
I am using OAuth2 with Spring Security.
My authentication manager configures client via database: clients.jdbc(dataSource());
Everything works, but when requesting a token, I get an exception:
2017-04-28 11:14:39.656 WARN 1200 --- [io-8096-exec-10]…

rumpel
- 495
- 9
- 23
5
votes
0 answers
Spring OAuth2 Implementation - A redirect is required to get the users approval
I know this question has been asked more than a few times and I have read over all of the answers but am still having an issue. Basically, I am trying to setup an OAuth2 RestTemplate but am receiving the error (like so many others) when attempting…

Matt Crysler
- 865
- 3
- 11
- 23
5
votes
1 answer
How to configure Spring Boot and Spring Security to support both form login and Google OAuth2 login
I am strugging to configure a Spring Boot application with Spring Security to support two login mechanisms: form login and Google OAuth2 login.
I want to have a login page with the traditional login form. This page would also have a "Authenticate…

codependent
- 23,193
- 31
- 166
- 308
5
votes
1 answer
How to combine Feign and OAuth 2.0?
I'm using Spring Feign and Oauth 2.0
My application has
1 Api gateway with @EnableOAuth2Sso
2 Services with @EnableResourceServer
When I call an api of an service from the other service, I get this exception.
feign.FeignException: status 401…

Tran Thien Chien
- 643
- 2
- 6
- 17
5
votes
1 answer
how to integrate regular username/password login with 3rd party social login for a Spring Boot + Angular single page web app?
I have a Angular + Spring boot single page web app. The server also acts as an Auth Server which issues tokens for the angular app to use to make Restful API calls.
My old login flow uses a grant_type=password POST call to the /oauth/token endpoint…

Quan Ding
- 727
- 1
- 10
- 21
5
votes
1 answer
Spring Security OAuth Java Config
I have a Spring app -- not a Spring Boot app -- that I'm trying to declare a section of the API as OAuth2 protected using Spring Security. My authorization and general resource access config works great when I define http elements in the XML, but…

jwilner
- 6,348
- 6
- 35
- 47