Git Product home page Git Product logo

spring-authorization-server's Introduction

Authorization server implementation

Description

Authentication sample using new spring authorization server. Includes: authorization server configuration; jwt with roles configuration (adding claims); spring security setup with roles filters; client SPA with pkce; custom login page; resorce server delivering principal.

Getting Started

Main Dependencies

spring-boot-starter-security; spring-boot-starter-web; spring-security-oauth2-authorization-server; spring-boot-starter-oauth2-resource-server; spring-boot-starter-thymeleaf; See pom file for complete dependencies.

Executing program

Use browser to request authorization code, copy value and add in a post request to token value (use postman software for token retrieve).

Browser:

With pcke:  http://127.0.0.1:8080/oauth2/authorize?response_type=code&client_id=SGProd&redirect_uri=http://10.8.216.99:3000/authorize&scope=openid&code_challenge=rMKPR6wVdfqySdN2inao89aPtczIzBmXcAGcTJOP0Bk&code_challenge_method=S256&state="STATE"
No pkce:  http://127.0.0.1:8080/oauth2/authorize?response_type=code&client_id=alessandro&redirect_uri=https://www.google.com&scope=openi

Postman:

POST -> http://127.0.0.1:8000/oauth2/token

[{"key":"grant_type","value":"authorization_code","description":""},
{"key":"client_id","value":"huongdanjava","description":""},
{"key":"client_secret","value":"123456","description":""},
{"key":"code","value":"AUTHORIZATION CODE HERE","description":""},
{"key":"redirect_uri","value":"http://127.0.0.1:8080/authorized","description":""}]

Version History

🚧 Projeto em construção 🚧

Acknowledgments

Inspiration, code snippets, etc.

spring-authorization-server's People

Contributors

dammota avatar

Watchers

 avatar

spring-authorization-server's Issues

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.