Giter VIP home page Giter VIP logo

fusionauth-spring-security's Introduction

FusionAuth Spring Security

This library provides an OpenID Connect implementation for FusionAuth and Spring Security.

Maven

<dependency>
  <groupId>io.fusionauth</groupId>
  <artifactId>fusionauth-spring-security</artifactId>
  <version>1.0.5</version>
</dependency>

Use our Example to get going and read through this tutorial to understand more about using Spring Security with FusionAuth.

If you encounter an issue with this library please open an Issue on this project, or if you get stuck integrating FusionAuth in your application open an issue here https://github.com/FusionAuth/fusionauth-issues/issues.

Configuration

Example configuration where the base URL of FusionAuth is login.piedpiper.com and the Spring application is running on port 8081.

# Copy this file to application.properties and fill in the clientId and clientSecret
server.port=8081
fusionAuth.clientId=<your client_id>
fusionAuth.clientSecret=<your client_secret>
fusionAuth.accessTokenUri=https://login.piedpiper.com/oauth2/token
fusionAuth.userAuthorizationUri=https://login.piedpiper.com/oauth2/authorize
fusionAuth.userInfoUri=https://login.piedpiper.com/oauth2/userinfo
fusionAuth.redirectUri=http://localhost:8081/login

License

Some portions of this code were forked/based on the code available here: https://github.com/eugenp/tutorials which are licensed under MIT. The full license is available under LICENSE.

fusionauth-spring-security's People

Contributors

dependabot[bot] avatar robotdan avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

erik-mythical

fusionauth-spring-security's Issues

Integrating fusionAuth (Oauth) with Spring cloud gateway (Reactive)

_I've got a problem to integrate fusionAuth with spring cloud gateway. can you help me on this issue?

this is my application.properties_

spring.security.oauth2.resourceserver.jwt.issuer-uri=${domain.oauth}/oauth/token

spring.security.oauth2.client.provider.global.issuer-uri=${domain.oauth}/oauth/token
spring.security.oauth2.client.provider.global.authorizationUri=${domain.oauth}/oauth/authorize
spring.security.oauth2.client.provider.global.jwk-set-uri=${domain.oauth}/token_keys
spring.security.oauth2.client.provider.global.user-name-attribute=user_name

spring.security.oauth2.client.provider.fusion.issuer-uri=http://localhost:9011/oauth2/token
spring.security.oauth2.client.provider.fusion.authorizationUri=http://localhost:9011/oauth2/authorize

spring.security.oauth2.client.registration.global.client-name=global-gateway
spring.security.oauth2.client.registration.global.scope=openid, any
spring.security.oauth2.client.registration.global.client-secret=ID
spring.security.oauth2.client.registration.global.client-id=secret

spring.security.oauth2.client.registration.fusion.scope=openid, email
spring.security.oauth2.client.registration.fusion.client-id=ID
spring.security.oauth2.client.registration.fusion.client-secret=secret    

integrating fusionAuth (Oauth) with Spring cloud gateway

_I've got a problem to integrate fusionAuth with spring cloud gateway. can you help me on this issue?
FYI: Meanwhile, I am using my custom Authorization server with below configuration and it is working, but , not with a fusionAuth

this is my application.yml_
spring:
security:
oauth2:
resourceserver:
jwt:
issuer-uri: ${domain.oauth}/oauth/token
client:
provider:
global:
issuer-uri: ${domain.oauth}/oauth/token
authorizationUri: ${domain.oauth}/oauth/authorize
jwk-set-uri: ${domain.oauth}/token_keys
user-name-attribute: user_name
fusion:
issuer-uri: http://localhost:9011/oauth2/token
authorizationUri: http://localhost:9011/oauth2/authorize
registration:
global:
client-name: motrada-gateway
scope:
- openid
- any
client-secret: 'client-secret'
client-id: 'client_id'
fusion:
scope:
- openid
- email
client-id: '77d6819f-e5d1-4628-a55c-e8b089ca8e69'
client-secret: 'mSqcm~'

Q: Support for client credential and password grants

It seems that currently this library concentrates on supporting OAuth2 authorization code grants.

Are there any plans to support also client credential and password grants?

For the time being, would you recommend to extend the OpenIDConnectFilter to support also other type of OAuth2ProtectedResourceDetails implementations than currently limiting it to OpenIDAuthorizationCodeResourceDetails. Any hints very appreciated, thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.