Skip to content

H3nSte1n/go-oauth-provider

Repository files navigation

OAuth 2.0 Provider | Golang


Code-Style MIT License made-with-Go

Table of Contents
  1. About The Project
  2. Requirements
  3. Setup
  4. Model Description
  5. ERD
  6. Sequence Diagram
  7. Tech stack
  8. Contact
  9. Acknowledgements

About The Project

Hi guys, a few days ago I was wondering how an OAuth Provider actually works. In order to get a deeper understanding, besides doing research, I decided to create one myself. So this project is for research purposes only. But feel free to look around and have fun :).

Requirements

  • docker
  • go version >= 1.18

Setup

The Setup is very simple. Just follow the two steps below:

  1. git clone ...

Pull the project from Github

  1. Removing the dist wording from the .env.dist filename

    • .env.dist -> .env
    • replace the dummy values
  2. docker-compose up

Start the Application.

Model Description

User

Each person who wants to use the Oauth provider must be a user.

AccessGroup

The AccessGroup is responsible for giving each user certain rights in the oauth-provider. For example, there can be two AccessGroups. One for admins and one for normal users. The admin can add new users, add additional resources, manage access rights... while the normal user can only access their own credentials and the resources assigned to them.

Ressource

Each resource simply represents an endpoint.

Scope

With the scope, the user can further restrict the access of external services to individual resources. For example, a service can access a resource but only read it.

Credentials

Each external service must create credentials. With these credentials, the service can create a token that allows access to the authorised resources.

ERD

oauth-provider-erd

Sequence Diagram

successfull-request-external-service

Tech stack

This section lists the main tech stack I used for this project.

Contact

Acknowledgements

About

In order to get a deeper understanding, besides research, I decided to create an OAuth provider myself. So this project is for research purposes only.

Topics

Resources

License

Stars

Watchers

Forks