πAPI Authorization
Segurança baseada em chaves secretas
The
Niro
has two types of route authorization, with themaster key
and theprivate key
.
Master Key
Main key accessed throughprocess.env.MASTER_KEY
.Private Key
Private key generated by the user.
All routes in the system are protected by authorization middleware.
Accessing protected route
You need to provide the
authorization
header to enter the value of themaste key
.
You must provide some security header. If you choose to provide your private key, enter the three headers that are required. By sending the private key, theauthorization
header does not need to be entered.
Example routing with authorization
header:
Get All Users
GET
http://localhost:4000/api/users
Returns all registered users.
Headers
authorization*
String
Security Field
key_tag
String
Security Field
key_secret
String
Security Field
key_value
String
Security Field
Example of routing with private key
headers:
Get All Users
GET
http://localhost:4000/api/users
Returns all registered users.
Headers
authorization
String
Security Field
key_tag*
String
Security Field
Key_secret*
String
Security Field
key_value*
String
Security Field
Last updated