Skip to content

EwvwGeN/authService

Repository files navigation

AuthService

An authorization service that works through a grpc connection.

Table of Contents

Proto

First you need to create a protofile.

If you use standard queries, you can skip this step.

After the change, you need to rebuild the go files. To do this, use the command:
make proto.

Build

If you have changed the protofile and/or are launching the service for the first time, you must first build it.

in the future, a step-by-step assembly will be written and this will be handled by the docker himself

For building only service:
make buildServer

Configuration

The config is located in the configs directory.

It should specify the:

  • logging level;
  • the port on which the service will run;
  • validation parameters;
  • params for mongodb.

If u will use docker-compose u shoulde change th .env file.

Startup

If you are not launching the service from docker-compose, you must specify the path to the config at startup (when using it):

./serverMain -config=./configs/example.yaml

or make a clean launch (then environment variables will be used):

./serverMain

If you are want launch service by docker-compose you can use Makefile command:
make or make runservice

or run docker-compose by yourself.

Usages

Registration

Request for registration:

{
    "email": "",
    "password": ""
}

Response for registration:

{
    "user_id": "",
}

Loginning

Request for Loginning:

{
    "email": "",
    "password": "",
    "app_id": ""
}

Response for Loginning:

{
    "token": "",
}

Checking for admin

Request for Loginning:

{
    "user_id": "",
}

Response for Loginning:

{
    "is_admin": false,
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages