简体   繁体   中英

Spring Oauth2 using ADFS Authorization Provider

I was given a spike to figure out how to use ADFS 3.0 Oauth2 as the authorization provider for a spring application. I have been able to get it to work by using the Spring Oauth2 example then basically hacking a UserInfoTokenServices by creating a JWT parser to extract the authorization out of it.

https://spring.io/guides/tutorials/spring-boot-oauth2/

Spring Boot oauth2: How to set the resource parameter in the authorization request to make adfs happy?

How to configure spring boot security OAuth2 for ADFS?

Is there a reason why using ADFS Oauth2 and Spring Oauth2 hasn't been developed together yet? Am I missing something? Is this taboo? If not is there a better way?

I think that initially Spring Securityt oAuth2 was not designed to work with ADFS server. The proper Java security engine that will easily resolve your problem is Pac4J and here there is a Spring Security Pac4j library that helps you to integrate your application with OAuth - SAML (ADFS) - CAS - OpenID Connect - HTTP - OpenID - Google App Engine - Kerberos - LDAP - SQL - JWT - MongoDB - CouchDB - IP address - REST API.

Here you can find great demo that will show you some authentication mechanisms that can be simply develoiped using Pac4j.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM