📝API Authorization
Segurança baseada em chaves secretas
The
Nirohas two types of route authorization, with themaster keyand theprivate key.
Master KeyMain key accessed throughprocess.env.MASTER_KEY.Private KeyPrivate key generated by the user.
Accessing protected route
You need to provide the
authorizationheader 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
{
"id": "{STRING}",
"username": "{STRING}"
}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
[
{
"id": "{STRING}",
"username": "{STRING}"
}
]Last updated