AuthenticationOptions interface
Options for specifying how the map control should authenticate with the Azure Maps services.
- Extends
Properties
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. |
Methods
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. |
Property Details
aadAppId
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
aadInstance
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
aadTenant
The AAD tenant that owns the registered app specified by aadAppId
.
Must be specified for AAD authentication type.
aadTenant?: string
Property Value
string
authContext
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
authType
The authentication mechanism to be used.
authType?: AuthenticationType
Property Value
clientId
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
getToken
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
sasToken
Optionally provide an initial token for sas authentication.
sasToken?: string
Property Value
string
subscriptionKey
Subscription key from your Azure Maps account. Must be specified for subscription key authentication type.
subscriptionKey?: string
Property Value
string
Method Details
setAadProperties(string, string, string, string, PublicClientApplication)
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
setSasCallbackFunction(getAuthTokenCallback)
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.
setSubscriptionKey(string)
Sets the required options to configure the subscription key authentication mechanism.
function setSubscriptionKey(key: string)
Parameters
- key
-
string
setTokenCallbackFunction(getAuthTokenCallback)
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.