Git Product home page Git Product logo

oauth2-implementation's Introduction

Spring Authorization Server with Wekan Integration  

Overview

This project is developed during my internship at Academia Sinica. It features a custom Spring Authorization Server designed to integrate with Wekan, the open-source kanban software, using OpenID Connect (OIDC) for authentication. One of the key enhancements of this server is the ability to log in using QR codes, streamlining the authentication process and saving time for users.

Features

  • OIDC Login: Implements OpenID Connect protocol to facilitate secure authentication and authorization processes.
  • Wekan Integration: Seamlessly integrates with Wekan, allowing users to manage kanban boards with improved authentication methods.
  • QR Code Login: Users can log in quickly by scanning a QR code with their mobile device, enhancing the user experience and access efficiency.

How to use?

Run Wekan

To ensure proper connectivity with the authorization server, especially when running on WSL2, update the OAUTH2_SERVER_URL in the Docker Compose configuration:

# .devcontainer/docker-compose.yml
- OAUTH2_SERVER_URL=http://{WSL IP address}:8080

To determine the WSL IP address, use the following command in your WSL terminal:

ip addr # Look for the IP address listed under eth0

Start the Wekan application using:

cd wekan-7.01
docker-compose -f .devcontainer/docker-compose.yml up

The app will run on http://localhost:3000 after you build it successfully.

Run Spring Authorization Server

Execute SpringAuthorizationServerExampleApplication.java in qrcode-spring-authorization folder to start the server. The server will be accessible at http://localhost:8080.

Testing with Postman

You can use Postman to test the QR code scanning part. First, you should scan the QR code with your cellphone, and you will get a token. Next, to simulate the login process through your application backend, follow these steps in Postman:

  • Create a new request.
  • Select 'POST' as the request method.
  • Set the request URL to http://localhost:8080/login/clt.
  • Configure the request body
{
    "token": "{The token you get when scanning Qrcode}", 
    "client_id": "wekan",
    "state": "eyJsb2dpblN0eWxlIjoicG9wdXAiLCJjcmVkZW50aWFsVG9rZW4iOiJIbEYxS1pBbVhpWTkzUUEzWmlvWkw4dWtHX0xtLUF4RlMyVzNBWFVidEg4IiwiaXNDb3Jkb3ZhIjpmYWxzZX0=",
    "userName": "admin",
    "password": "password"
}

This setup allows you to thoroughly test and ensure the authentication process with Wekan.

Reference

Flow Chart: https://docs.google.com/presentation/d/1CiAiuay5rd1KDDnYwOyu6ud9xk5ZetSQDOMp9DYUKjs/edit#slide=id.g8bb7b0e120_0_0

oauth2-implementation's People

Contributors

esther125 avatar

Stargazers

 avatar

Watchers

 avatar

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.