Official tutorial: https://spring.io/guides/tutorials/spring-boot-oauth2/
Questions tagged [spring-oauth2]
708 questions
0
votes
1 answer
Configuring Spring OAuth2 expression handler methods for authorization server endpoints using java config
In our app we would like to lock down the check_token endpoint so that only clients authenticated using client credentials can check the validity of tokens.
The documentation states that an expression handler is enabled by default when…

Fitzoh
- 776
- 1
- 6
- 12
0
votes
0 answers
Spring CSRF forwarding/disabling
this is my sample application. GATEWAY is the entry point for all other applications. Basically it's the proxy. It's capable of csrf protection. When I access the url localhost:8080/login firstly csrf token is created for GATEWAY and then request is…

bilak
- 4,526
- 3
- 35
- 75
0
votes
1 answer
How to encode an authorization request_uri
I need to construct a custom request_uri for an implementation of Spring OAuth2. What specific code should be used to properly encode each of the parameters in the request_uri?
The full, unencoded, request_uri is as follows, but is resulting in an…

CodeMed
- 9,527
- 70
- 212
- 364
0
votes
1 answer
How to configure web security in spring security to allow some url to access?
How to configure WebSecurity in java based to allow some urls to be accessed. i tried as below
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeUrls()
…

raju vaishnav
- 751
- 1
- 6
- 17
0
votes
1 answer
Spring Security, Refresh Token & NotSerializableException
I have the following entities:
@Entity
@Table(name = "ct_users")
@JsonIgnoreProperties("password", "enabled", "driver", "reviews")
open class User(
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
val id:…

Fernando Luiz
- 131
- 1
- 2
- 11
0
votes
1 answer
Error HTTP Status 500 - No WebApplicationContext found: no ContextLoaderListener registered?
Hi I am new to Spring Security and Spring Oauth, i am configuring a Spring Oauth Server and Resource Server java based. but i need to configure some of the web mvc based on xml, like need to initialize servlet parameters.
below is my…

raju vaishnav
- 751
- 1
- 6
- 17
0
votes
2 answers
Spring Boot Resource Server not able to authorize roles with oAuth 2 Access Token
I have the following 3 micro-services in place
Config Server
Auth Server using MongoDB referencing link. I successfully migrated the project from 1.2.4 to 1.3.3
User Service. A Rest Controller and a Resource Server with 3 Get methods.(each for…

ionade
- 1
- 1
- 4
0
votes
1 answer
How does one override this `/error` endpoint?
I am studying Spring OAuth by decomposing this set of three interconnected apps at GitHub, while also carefully studying the Spring OAuth 2 Developer Guide at this link. The Developer Guide says that the /oauth/error endpoint needs to be…

CodeMed
- 9,527
- 70
- 212
- 364
0
votes
1 answer
Obtaining Authorization Code from Spring OAuth 2.0 Authorization Server programmatically
I am trying to obtain an authorization code from a Spring OAuth 2.0 authorization server using simple CURL command.
curl -v --header "Authorization: Basic hasfhfashfakhsfakhf712641246"…

sunsin1985
- 2,437
- 5
- 22
- 27
0
votes
0 answers
Spring Boot OAuth2 https redirect_uri instead of http
I use Spring Boot OAuth2 and @EnableOAuth2Client. My application runs on HTTPS but when I try to login to Odnoklassniki Social Network it generates following…

alexanoid
- 24,051
- 54
- 210
- 410
0
votes
1 answer
Spring OAuth2 additional permision
I need to add additional restriction to authenticate users. My User model has a field 'active'. It is false, when User registers, but not activate his account with hash from mail. Now, even if User is not active he gets access_token from Oauth.
How…

rpieniazek
- 2,160
- 2
- 12
- 16
0
votes
1 answer
Spring - Oauth2 Client server. NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName() While running in tomcat
I was trying to develop a client server in oauth2. My resource server and auth server are already in place. To enable the client server as SSO my security config is following
@Configuration
public class SecurityConfig extends…

Bikash Rath
- 159
- 1
- 7
0
votes
2 answers
Spring Security with oAuth2 /oAuth/Token request 405 method not allow
I am using oAuth2 token with Spring Security. If am using using same configuration with Spring boot 1.3.0 and it working fine for me. But when i am using same configuration with Spring Mvc applicaito. Then it will creating a issue
/oAuth/token --->…

Charnjeet Singh
- 3,056
- 6
- 35
- 65
0
votes
2 answers
Spring OAuth2 and JWT Authentication information
I have a Spring Boot (1.3.x) application acting as a resource server, that I can pass a JWT token from Keycloak in the Authorization header and am cleared to access some endpoints. The issue I am running into is that I can't get information which…

jeremy simon
- 601
- 1
- 8
- 19
0
votes
1 answer
Spring Boot and OAuth2 social login, unable to get refreshToken
There is a guide how to implement OAuth2 using Spring and Spring Boot https://spring.io/guides/tutorials/spring-boot-oauth2/
I need to store OAuth2 information like accessToken, refreshToken in my database for future use. Right now I can only get…

alexanoid
- 24,051
- 54
- 210
- 410