Token Renew Service

Release Time
12/18/2017
Views
1385 times
Category
Comodo ONE portal
Tags

1. Introduction

3rd Party Authentication and Authorization API provides a security mechanism similar to OAuth2 standard. With this mechanism client APIs can access C1 Platform Resources in a secure way. 

There are some prerequisites before usage of this API. 

  • Client API credentials. Credentials will be provided by the C1 team. The credentials shall be used for HTTP Basic Authentication of endpoints.

  • Resource owner credentials. Credentials shall be used for login endpoint. Username/password and TLS Client Certificate Verification.

First clients need to obtain access and refresh tokens via login endpoint. With access token clients can access protected resources. Please see section "Usage Of Access Token" to use access tokens. 

For testing purposed on Preview Environment following credentials is created.

For User Client (name):

    username: user

    password: *******************************


Access tokens are short lived tokens. Therefore they expire quickly. New access tokens can be obtained without resource owner credentials via renew endpoint. Refresh tokens are used to create new access tokens. Refresh tokens are long lived tokens and can be persisted for longer use. They are critical for the security of protected resources. Because of that please store them in a secure way and do not share them with any other 3rd parties. 

On order to access Authentication API TLS Client Certificate Verification is also performed. Therefore the test certificate must be shared with Comodo to grad access.

For details of the transactions for authentication API please look at 3rd Party API 


2.2. Token Renew Service

 

Endpoint

https://api.one.comodo.com/auth/renew

Method

POST

Authentication

HTTP Basic (Client API Credentials)

Content-Type

JSON (application/json)

 

Descriptions:

REQUEST

NAME

TYPE

REQUIRED

DESCRIPTIONS

refreshToken

string

required

 

RESPONSE

NAME

TYPE

REQUIRED

DESCRIPTIONS

tokenType

string

required

bearer

accessToken

string

required

Access Token

refreshToken

string

required

Refresh Token

accessTokenExpiresAt

integer (UNIX Timestamp)

required

Access token lifetime. 1 hour

refreshTokenExpiresAt

integer (UNIX Timestamp)

required

Refresh token lifetime 1 week

 

 

 

HTTP CODE

MESSAGE

DESCRIPTIONS

401

Not authorized

Client credentials or user password invalid.

400

Invalid request

Request parameters are missing or invalid.

Execution

Sample execution can be handled via Postman Application. 

Header part can be handled via Postman Application

Success Output

Error Output