Functions of org.wso2.ballerina.connectors.oauth2 package
function constructAuthHeader(message request, string accessTokenValue, string accessToken) (string )
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
request | message | |
accessTokenValue | string | |
accessToken | string |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string |
function getAccessTokenFromRefreshToken(message request, string accessToken, string clientId, string clientSecret, string refreshToken, string refreshTokenEP) (string )
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
request | message | |
accessToken | string | |
clientId | string | |
clientSecret | string | |
refreshToken | string | |
refreshTokenEP | string |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string |
Connectors of org.wso2.ballerina.connectors.oauth2 package
connector ClientConnector (string baseUrl, string accessToken, string clientId, string clientSecret, string refreshToken, string refreshTokenEP)
OAuth2 client connector
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
baseUrl | string | The endpoint base url |
accessToken | string | The access token of the account |
clientId | string | The client Id of the account |
clientSecret | string | The client secret of the account |
refreshToken | string | The refresh token of the account |
refreshTokenEP | string | The refresh token endpoint url |
action delete()
Delete with OAuth2 authentication
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
path | string | The endpoint path |
request | message | The request of the method |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
message | response object |
action get()
Get with OAuth2 authentication
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
path | string | The endpoint path |
request | message | The request of the method |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
message | response object |
action patch()
Patch with OAuth2 authentication
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
path | string | The endpoint path |
request | message | The request of the method |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
message | response object |
action post()
Post with OAuth2 authentication
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
path | string | The endpoint path |
request | message | The request of the method |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
message | response object |
action put()
Put with OAuth2 authentication
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
path | string | The endpoint path |
request | message | The request of the method |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
message | response object |