There is available by default implicit client with id site. You can view a list of available clients, add new or edit existing clients on the Client page in the box dashboard. See RFC6749 for more information about OAuth 2.0 authorization.
Let's check that there is existing default client of type implicit and with the client_id = site.
In order to test implicit authorization, let's add a new policy that will be checking for implicit client with the client_id = site.
{
"required" : [ "client" ],
"properties" : {
"client" : {
"type" : "object",
"properties" : {
"client_id" : {
"constant" : "site"
}
}
}
}
}
In order to test the Authorization Code type of authorization, you will need a tool for testing RESTful requests. For example Postman.
Let's add a new client with the Authorization Code type.
Let's add a new policy that would allow an access for all clients.
{
"required" : [ "client" ],
"properties" : {
"client" : {
"type" : "object"
}
}
}
Click the Request Token button.
[
{
"id": 1,
"status": null,
"email": "boxuser1@gmail.com",
"data": "null",
"groups": null,
"group-ids": []
}
]
Let's add a new client with the Client credentials type.
Ensure that there is the policy:
{
"required" : [ "client" ],
"properties" : {
"client" : {
"type" : "object"
}
}
}
Fill in the following fields:
Click the Request Token button.
You will see something like:
[
{
"id": 1,
"status": null,
"email": "boxuser1@gmail.com",
"data": "null",
"groups": null,
"group-ids": []
}
]