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

Implement Keycloack Authorization server using Spring Security 5 OAuth2

I've written a software system that uses Spring Cloud Netflix. Due to Spring Security 5 not offering support for writing an Authorization Server (pls shout out here https://github.com/spring-projects/spring-security/issues/6320) I need to write my…
1
vote
2 answers

Spring Boot 2, Cloud Netflix and username/password authentication architecture

This is an architecture question. I want to implement an application that processes two kinds of users (admin and clients). Each role can register in the following ways: admin: username/password registration client:…
1
vote
2 answers

Is it possible to configure OAuth2 in Spring Boot to respond with JSON instead of HTML for InvalidTokenException?

My Spring Boot application uses OAuth2 for security and token management. I’m querying one of my REST endpoints with an invalid token to test its response using Postman. The endpoint is correctly responding with 401 InvalidTokenException but the…
1
vote
1 answer

Multiple Authentication providers - LDAP JWT Oauth2 and Basic Authentication in Spring Boot Application

I am having a Spring Boot 2.0 application that serves as back-end (provides rest services) for my angular app. We are having LDAPauthentication for login. It works perfectly fine. We have implemented custom code for it using spring-oauth-2 and…
1
vote
0 answers

Spring Social After succesfull login redirect problem

I configured my spring boot application for social login with this documentation. Application started and I have logined with my gmail account. There is no problem thus far. But when I login with a gmail account my app is not getting user infos.…
1
vote
0 answers

Spring boot expose rest API with basic auth using client ID and Client password

In my application i have both rest as well as web part. The web part has url pattern of /admin/** which uses form based authentication. while rest part has url pattern of /api/** which uses jwt token for authentication. Also by default configuration…
1
vote
1 answer

Secure a resource server RESTful API with third party authentication

First of all, I have an oauth2 authorization server developed with Spring Boot, annotated with @EnableAuthorizationServer and extending AuthorizationServerConfigurerAdapter. Same way there is a resource server annotated with @EnableResourceServer…
1
vote
1 answer

EnableOAuth2Client deprecated

Currently, I am using Spring Boot 2.2.5 Release. Documentation looks incomplete. What is the replacement for @EnableOAuth2Client or @EnableOAuth2Sso.enter image description here
Samanta
  • 73
  • 2
  • 4
1
vote
1 answer

EnableWebSecurity annotation gives error at spring-security-oauth2

I am using Spring Boot including Spring 2.1.2 Release Security and using KeyCloak Oauth2.0. But when I restart the application I got the following error. Parameter 0 of method tokenRelayGatewayFilterFactory in…
Tonyukuk
  • 5,745
  • 7
  • 35
  • 63
1
vote
1 answer

Spring Security 5 and jwk-set-uri with Authentication

Well, I have a URL to get public-keys but this URL require a Bearer Token, so I have the following in my application.properties: spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://myauth-server.com/keys.jwt And my Security Configuration…
Ronaldo Lanhellas
  • 2,975
  • 5
  • 46
  • 92
1
vote
0 answers

OAuth2 Password grant Spring Serurity

I have problems with configuration passport grant. I need to do POST request "auth" with username and password (basic auth) and return token in response. What I have according…
aliyah
  • 11
  • 1
1
vote
1 answer

ClientId can not be parsed from CF with spring-security-oauth2 and Tomcat

After updating from Spring boot 2.1.13 to the latest 2.2.5 Some of my Tomcat applications are failing to deploy to cloud foundry. The error message in the logs 2020-03-23T13:13:34.84-0400 [APP/PROC/WEB/0] OUT 2020-03-23 17:13:34.848 WARN 28 ---…
ndrone
  • 3,524
  • 2
  • 23
  • 37
1
vote
0 answers

Spring Security OAuth2 JWT save last login date

As the title states, I want to save/update user's last login date. I'm using spring security oauth2 JWT with both AuthorizationServer/ResourceServer in the same app. org.springframework.boot
rotjko
  • 11
  • 2
1
vote
1 answer

Spring Boot: OAuth endpoint redirects to 8443

I have a web-app running with SSL only (no http allowed) on port 8080: server: ssl: key-store-type: PKCS12 key-store: file:${SERVER_KEYSTORE_PATH} key-store-password: ${SERVER_CERT_PASSWORD} port: 8080 When I launch the app, I see…
1
vote
1 answer

OAuth2 login with Nativescript - Avoiding external browser / webview is possible?

I'm working on a new project with OpenId Connect based security. Being a novice with this technology (and with mobile development too), I wasn't able to find an exact answer to my question. Little introduction to the project: Generated the API…