Skip to content

uoft-treat/authentication-common-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Authentication Common Service

Provides authentication services.

Dev https://dev-authentication-common-service.treatproject.tk/

API Reference

Create User

POST /users

Request

{
	"username": "[email protected]",
	"password": "securepassword"
}

Response

{
    "roles": [
        "ADMIN"
    ],
    "_id": "5d1a4b8dba180f9cd1daba5d",
    "username": "[email protected]",
    "password": "64e936713937610581039f9a00bba386425c96c431b311d61496c04a7f39ae1c",
    "source": "LOCAL",
    "__v": 0
}

List Users

GET /users

Response

[
  {
      "roles": [
          "ADMIN"
      ],
      "_id": "5d1a4b8dba180f9cd1daba5d",
      "username": "[email protected]",
      "password": "64e936713937610581039f9a00bba386425c96c431b311d61496c04a7f39ae1c",
      "source": "LOCAL",
      "__v": 0
  },
  ...
]

Create Token

POST /tokens

Request

{
	"username": "[email protected]",
	"password": "securepassword"
}

Response

{
    "_id": "5d1a51def76ddba0c557d4c6",
    "user": {
        "roles": [
            "ADMIN"
        ],
        "_id": "5d1a4b8dba180f9cd1daba5d",
        "username": "[email protected]",
        "password": "64e936713937610581039f9a00bba386425c96c431b311d61496c04a7f39ae1c",
        "source": "LOCAL",
        "__v": 0
    },
    "body": "3adfb205-1bf9-445d-b15a-c310deb6a923",
    "__v": 0
}

Get User by Token

GET /tokens/:body

Response

{
    "roles": [
        "ADMIN"
    ],
    "_id": "5d1a4b8dba180f9cd1daba5d",
    "username": "[email protected]",
    "password": "64e936713937610581039f9a00bba386425c96c431b311d61496c04a7f39ae1c",
    "source": "LOCAL",
    "__v": 0
}

About

Provides authentication services from I.A.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published