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

What class/method in Spring Security handles redirecting to /oauth2/authorization/{registrationId}? Need to override for container

We're deploying our API in a docker container behind a gateway. Everything behind the gateway is http, not https. As a result, when Spring Security tries to redirect a user to the authorization Uri, it does it to http which throws a 404. (because…
Don Rhummy
  • 24,730
  • 42
  • 175
  • 330
1
vote
0 answers

Login in Spring security special character in password

I am new to spring security.The default login url of oauth is like: {{base url}}/oauth/token?username=your_username&password=ourpassword&grant_type=password&client_id=customer-client This works fine but, when my password has special characters like…
Sudip Bolakhe
  • 513
  • 5
  • 16
1
vote
1 answer

How to test AuthenticationPrincipal and getting an ID Token in Spring Security?

I have the following LogoutResource class that returns an ID Token. package com.mycompany.myapp.web.rest; import org.springframework.http.ResponseEntity; import org.springframework.security.core.annotation.AuthenticationPrincipal; import…
Matt Raible
  • 8,187
  • 9
  • 61
  • 120
1
vote
1 answer

How can I use curl to obtain access token for a Spring Boot Rest API?

I am developing a Spring Boot Rest API using token authentication.However I don't know how to obtain access token using curl.I have developed a client for this application but I can't obtain access token using the Spring client. Here is the…
freelancer86
  • 511
  • 2
  • 7
  • 20
1
vote
1 answer

ClientDetailsService gets called 6 times during authentication

We wrote a custom ClientDetailsService for our OAuth2 authorization server: public class MyClientDetailsService implements ClientDetailsService { @Override public ClientDetails loadClientByClientId(String clientId) { log.info("Got called!"); …
dso
  • 109
  • 10
1
vote
0 answers

Spring OAuth2 refresh token is going to authenticate the user again

I am sending request to server for getting new access token by using refresh token but there is call going to authenticate and I think it shout not authenticate as user is already authenticated. I just need a new access token by using refresh…
1
vote
0 answers

Spring boot oauth application not redirecting to the login.html after successful logout

I have followed Spring Boot and OAuth2 tutorial and done some of the changes for the UI as below. Created a login.html with below content
1
vote
0 answers

NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.security.authentication.AuthenticationManager' available gradle

I am developing Rest API with Gradle,Spring Boot and Spring Security.The API will be secured using token authenication. However when I run the Spring Boot application I get the following error: NoSuchBeanDefinitionException: No qualifying bean of…
1
vote
1 answer

Spring Oauth2 Authorization server User Info Endpoint with multiple grant_type not working

I've authorization server which has inbuilt DB Authentication manager. Here are the configurations. AuthConfig.java @Configuration @EnableAuthorizationServer public class AuthConfig extends AuthorizationServerConfigurerAdapter { @Autowired …
1
vote
1 answer

Two difference implementation of Principal interface between Spring Security & OAuth2

There had been being a monolithic java-application that is configured by Spring Security. Whenever I want to get the authenticated user, the org.springframework.serurity.authentication.UsernamePasswordAuthenticationToken object gives me like…
1
vote
0 answers

OAuth2 authentication : serialized class imcompatible after Java update

Here is the context : I have a Spring Boot application which uses spring-security to implement OAuth2 system. It is linked to a mySQL database. I made a mysqldump export of my database on my old environment (Ubuntu 14.04, mysql 5.5, OpenJDK 6) to…
1
vote
0 answers

oAuth2 workflow on Spring Security for Stateless Web services using JWT or likewise?

Default oAuth2 implementation on Spring Security issues JSESSIONID making it stateful implementation - does Spring Security support oAuth2 workflow in a stateless manner - say via JWTs? Note : I am looking for "Authorization Code Grant" workflow…
takrishna
  • 4,884
  • 3
  • 18
  • 35
1
vote
0 answers

Spring Boot 2.0 OAuth2 Client - Getting bearer token across sessions

I have a basic OAuth2 App set up: @Configuration @EnableOAuth2Sso @Order(0) public class SecurityConfig extends WebSecurityConfigurerAdapter { @Override public void configure(HttpSecurity http) throws Exception { …
1
vote
0 answers

Unable to expose endpoint in Spring Boot to receive authorization code from Google

I have a set of micro-services, written using Springboot 1.5.6, which contain the business logic to be consumed by a SinglePageApplication. The task is to implement method based security for the Restful APIs using OAuth2 and providing both…
Abhishek Prabhat
  • 917
  • 1
  • 6
  • 15
1
vote
0 answers

Remember target URL without HTTP Session

In context of a backend proxying a CAS, my users have often the default redirect page instead of original page. In the workflow of my application, when I need to access to a resource server from my webapp, it needs to have a valid JWT token given by…
Erwann
  • 11
  • 4
1 2 3
99
100