OAuth 2.0 authentication examples

In case the access token provided in this authentication scheme expires, access token expiry action can be taken using below options:

REPORT ERROR

In the following example, assume that the adapter is used in a GET function defined as follows:

GET("REST", -U restURL -M get -A OAUTH2 -ATEA reportError -AT accToken -H header1=value1 header2=value2", inputdata)

In the following example, assume that the adapter is used in a PUT function defined as follows:

PUT("REST", " -U restURL -M get -A OAUTH2 -ATEA reportError -AT accToken -H header1=value1 header2=value2", inputdata)

REFRESH TOKEN

In the following example, assume that the adapter is used in a GET function defined as follows:

GET("REST", " -U restURL -M get -A OAUTH2 -ATEA refresh_token -TURL tokenURL -CK consumerKey -AT accToken -RT refreshToken -TF filepath -EK eKey -H header1=value1 header2=value2 ", inputdata)

In the following example, assume that the adapter is used in a PUT function defined as follows:

PUT("REST", " -U restURL -M get -A OAUTH2 -ATEA refresh_token -TURL tokenURL -CK consumerKey -AT accToken -RT refreshToken -TF filepath -EK eKey -H header1=value1 header2=value2 ", inputdata)

REQUEST NEW TOKEN

In the following example, assume that the adapter is used in a GET function defined as follows:

GET("REST", " -U restURL -M get -A OAUTH2 -ATEA password -UN username -PWD password -TURL tokenURL -CK consumerKey -CS consumerSecret -AT accToken -ST secToken -RT refreshToken -TF filepath -EK eKey -H header1=value1 header2=value2 ", inputdata)

In the following example, assume that the adapter is used in a PUT function defined as follows:

PUT("REST", " -U restURL -M get -A OAUTH2 -ATEA password -UN username -PWD password -TURL tokenURL -CK consumerKey -CS consumerSecret -AT accToken -ST secToken -RT refreshToken -TF filepath -EK eKey -H header1=value1 header2=value2 ", inputdata)