authentication
Creates, updates, deletes, gets or lists an authentication resource.
Overview
| Name | authentication |
| Type | Resource |
| Id | azure.container_registry_dataplane.authentication |
Fields
The following fields are returned by SELECT queries:
- get_acr_access_token_from_login
| Name | Datatype | Description |
|---|---|---|
access_token | string | The access token for performing authenticated requests. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_acr_access_token_from_login | select | service, scope, endpoint | Exchange Username, Password and Scope for an ACR Access Token. | |
exchange_aad_access_token_for_acr_refresh_token | exec | endpoint, grantType, service | Exchange AAD tokens for an ACR refresh Token. | |
exchange_acr_refresh_token_for_acr_access_token | exec | endpoint, grantType, service | Exchange ACR Refresh token for an ACR Access Token. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
scope | string | Expected to be a valid scope, and can be specified more than once for multiple scope requests. You can obtain this from the Www-Authenticate response header from the challenge. Required. |
service | string | Indicates the name of your Azure container registry. Required. |
SELECT examples
- get_acr_access_token_from_login
Exchange Username, Password and Scope for an ACR Access Token.
SELECT
access_token
FROM azure.container_registry_dataplane.authentication
WHERE service = '{{ service }}' -- required
AND scope = '{{ scope }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
Lifecycle Methods
- exchange_aad_access_token_for_acr_refresh_token
- exchange_acr_refresh_token_for_acr_access_token
Exchange AAD tokens for an ACR refresh Token.
EXEC azure.container_registry_dataplane.authentication.exchange_aad_access_token_for_acr_refresh_token
@endpoint='{{ endpoint }}' --required
@@json=
'{
"grantType": "{{ grantType }}",
"service": "{{ service }}",
"tenant": "{{ tenant }}",
"refreshToken": "{{ refreshToken }}",
"accessToken": "{{ accessToken }}"
}'
;
Exchange ACR Refresh token for an ACR Access Token.
EXEC azure.container_registry_dataplane.authentication.exchange_acr_refresh_token_for_acr_access_token
@endpoint='{{ endpoint }}' --required
@@json=
'{
"grantType": "{{ grantType }}",
"service": "{{ service }}",
"tenant": "{{ tenant }}",
"refreshToken": "{{ refreshToken }}",
"accessToken": "{{ accessToken }}"
}'
;