AuthenticationOptions interface
Options for specifying how the map control should authenticate with the Azure Maps services.
- Extends
aad |
The Azure AD registered app ID. This is the app ID of an app registered in your Azure AD tenant. Must be specified for AAD authentication type. |
aad |
The AAD instance to use for logging in.
Can be optionally specified when using the AAD authentication type.
By default the |
aad |
The AAD tenant that owns the registered app specified by |
auth |
Optionally provide an existing |
auth |
The authentication mechanism to be used. |
client |
The Azure Maps client ID, This is an unique identifier used to identify the maps account. Preferred to always be specified, but must be specified for AAD and anonymous authentication types. |
get |
A callback to use with the anonymous/sas authentication mechanism. This callback will be responsible for resolving to a authentication token. E.g. fetching a CORS protected token from an endpoint. |
sas |
Optionally provide an initial token for sas authentication. |
subscription |
Subscription key from your Azure Maps account. Must be specified for subscription key authentication type. |
set |
Sets the required authentication options to configure the AAD implicit grant mechanism. |
set |
Sets the required options to configure the sas authentication method. |
set |
Sets the required options to configure the subscription key authentication mechanism. |
set |
Sets the required options to configure the anonymous authentication method. |
The Azure AD registered app ID. This is the app ID of an app registered in your Azure AD tenant. Must be specified for AAD authentication type.
aadAppId?: string
Property Value
string
The AAD instance to use for logging in.
Can be optionally specified when using the AAD authentication type.
By default the https://login.microsoftonline.com/
instance will be used.
aadInstance?: string
Property Value
string
The AAD tenant that owns the registered app specified by aadAppId
.
Must be specified for AAD authentication type.
aadTenant?: string
Property Value
string
Optionally provide an existing PublicClientApplication
from the MSAL.js library.
This authentication context will be used to acquire the AAD token.
Only used with the AAD authentication type.
This auth context must be configured to use the same AAD app ID as this.aadAppId
.
If this is not provided all map instances will share their own private auth context.
authContext?: PublicClientApplication
Property Value
PublicClientApplication
The authentication mechanism to be used.
authType?: AuthenticationType
Property Value
The Azure Maps client ID, This is an unique identifier used to identify the maps account. Preferred to always be specified, but must be specified for AAD and anonymous authentication types.
clientId?: string
Property Value
string
A callback to use with the anonymous/sas authentication mechanism. This callback will be responsible for resolving to a authentication token. E.g. fetching a CORS protected token from an endpoint.
getToken?: getAuthTokenCallback
Property Value
Optionally provide an initial token for sas authentication.
sasToken?: string
Property Value
string
Subscription key from your Azure Maps account. Must be specified for subscription key authentication type.
subscriptionKey?: string
Property Value
string
Sets the required authentication options to configure the AAD implicit grant mechanism.
function setAadProperties(clientId: string, aadAppId: string, aadTenant: string, aadInstance?: string, authContext?: PublicClientApplication)
Parameters
- clientId
-
string
Client ID from your azure maps account
- aadAppId
-
string
Azure AD App ID
- aadTenant
-
string
Azure AD Tenant Name
- aadInstance
-
string
An optional Azure AD Instance
- authContext
-
PublicClientApplication
An optional PublicClientApplication
from the MSAL.js library
Sets the required options to configure the sas authentication method.
function setSasCallbackFunction(getTokenCallback: getAuthTokenCallback)
Parameters
- getTokenCallback
- getAuthTokenCallback
Callback function responsible for resolving to an authentication token.
Sets the required options to configure the subscription key authentication mechanism.
function setSubscriptionKey(key: string)
Parameters
- key
-
string
Sets the required options to configure the anonymous authentication method.
function setTokenCallbackFunction(getTokenCallback: getAuthTokenCallback)
Parameters
- getTokenCallback
- getAuthTokenCallback
Callback function responsible for resolving to an authentication token.