How does the OAUTH 2.0 authorization work?
OAuth 2.0 is a standard authorization protocol that allows applications to access a user's account in a web service (HTTP) such as the Valuekeep CMMS Web API. The protocol delegates user authentication to the service that holds the user's account and authorizes external applications to access that user's account. The protocol makes authorization flows available for Web, desktop and mobile apps. We now describe the basic operation of the protocol from the perspective of an application developer. The protocol defines 4 roles: From the point of view of an application developer, the Web API you want to consume acts both as resource server and the authorization server. It is, therefore, common for the two roles to be combined in what is called a Service or simply an API. The normal authorization flow from an external application will follow these steps: The type of grant used depends on the authorization method the app wishes to use and, of course, of the methods supported by the Web API. To work with the Valuekeep CMMS Web API, you must use the Client Credentials authorization method. When an access token expires, its use to perform requests to the API will result in the error “Invalid Token Error”. In that moment, if a refresh token has been included when the access token is generated, you can use it for a new server access token. Example of a request of that type:OAuth Roles
Generic authorization flow
Authorization Grant: Client credentials grant
Refresh Token
login para deixar a sua opinião.