TokenCredentialsBase class
Costruttori
Token |
Proprietà
auth |
|
client |
|
domain | |
environment | |
token |
|
token |
Metodi
get |
Prova a ottenere il token dalla cache inizialmente. Se non riesce, prova a ottenere il token da ADAL. |
set |
|
sign |
Firma una richiesta con l'intestazione Autenticazione. |
Dettagli costruttore
TokenCredentialsBase(string, string, string, Environment, TokenCache)
new TokenCredentialsBase(clientId: string, domain: string, tokenAudience?: string, environment?: Environment, tokenCache?: TokenCache)
Parametri
- clientId
-
string
- domain
-
string
- tokenAudience
-
string
- environment
- Environment
- tokenCache
-
TokenCache
Dettagli proprietà
authContext
authContext: AuthenticationContext
Valore della proprietà
AuthenticationContext
clientId
clientId: string
Valore della proprietà
string
domain
domain: string
Valore della proprietà
string
environment
tokenAudience
tokenAudience?: string
Valore della proprietà
string
tokenCache
tokenCache: TokenCache
Valore della proprietà
TokenCache
Dettagli metodo
getToken()
Prova a ottenere il token dalla cache inizialmente. Se non riesce, prova a ottenere il token da ADAL.
function getToken(): Promise<TokenResponse>
Restituisce
Promise<TokenResponse>
Il tokenResponse (tokenType e accessToken sono le due proprietà importanti).
setDomain(string)
function setDomain(domain: string)
Parametri
- domain
-
string
signRequest(WebResource)
Firma una richiesta con l'intestazione Autenticazione.
function signRequest(webResource: WebResource): Promise<WebResource>
Parametri
- webResource
- WebResource
WebResource da firmare.
Restituisce
Promise<WebResource>