how to get authorization token for admin api ?
# help
b
how to get authorization token for admin api ?
j
o
Hi, It is possible to configure
username
and
password
for Admin API. Please see https://docs.cerbos.dev/cerbos/latest/configuration/server#admin-api The default username is
cerbos
, and the password is
cerbosAdmin
.
b
i want authorization token where i see authorization token ? any api for get authorization token ?
o
You could use it like this in Postman
or
Copy code
$ echo -n "cerbos:cerbosAdmin"|base64

Y2VyYm9zOmNlcmJvc0FkbWlu
Then set
Authorization
header to this;
Copy code
Basic Y2VyYm9zOmNlcmJvc0FkbWlu
b
what is url and method for above postman?
j
@Balwan singh this is using Basic auth scheme. https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#restricting_access_with_apache_and_basic_authentication in this scheme, you take <username> then put a
:
then put <password> then base64 encode the whole string. You then pass it to the REST API endpoint via the Authorization: Basic header.
b
thank you so much😊