Sign inSign up

brewery/oauth-server

By brewery

Updated over 2 years ago

Image
0

3.4K

brewery/oauth-server repository overview

Brew Logo

OAuth Server

Docker Pulls Package License

Instagram Linkedin Twitter

Purpose

This project contains implementation of OAuth 2.0 which is the industry-standard protocol for authorization. It's developed by using Spring Boot framework in Java.

Usage Instructions

These instructions provide information on how to use the oauth-server project.

Starting Locally

You can run the server in your local environment with below commands.

Dependency Installation
mvn clean install
Database Connection

You will need a postgres database with OAuth Server entities to run the server. You can run the OAuth Server Hasura in your local environment to get a proper database.

Environment Variables

You will need to add below environment variables to run the server. These values must be provided in env.properties file in the root directory.:

Variable NameDescriptionRequiredDefault Value
DB_HOSTRepresents the hostname of the database that needs to be connected.YES-
DB_NAMERepresents the name of the database that needs to be connected.YES-
DB_USERRepresents the user of the database that needs to be connected.YES-
DB_PASSWORDRepresents the password of the database that needs to be connected.YES-
AUTHORIZATION_CODE_EXPIRES_MSRepresents the expiry time of authorization code in milliseconds.No300000
LOGIN_SIGNUP_ENDPOINT.Represents the login/signup endpoint of the implementer application.YES-
Starting the Server
mvn spring-boot:start
Stopping the Server
mvn spring-boot:stop
Running with Docker

You can run the server in Docker environment with below commands:

First, you need to build the image:

docker build . -t oauth-server

Then, you can run the image with following command:

docker run -d -p 8080:8080 -e DB_HOST=<database_host> -e DB_NAME=<database_name> -e DB_USER=<database_username> -e DB_PASSWORD=<database_password> oauth-server -e LOGIN_SIGNUP_ENDPOINT=<login_signup_endpoint>
Running Tests

You can run the tests with below command:

mvn test

License

OAuth Server is MIT licensed.

Tag summary

Content type

Image

Digest

sha256:381c75103

Size

292.5 MB

Last updated

over 2 years ago

docker pull brewery/oauth-server