Click or drag to resize

AuthenticationManager Methods

The AuthenticationManager type exposes the following members.

Methods
  NameDescription
Public methodCode exampleAddCredential
Adds a new Credential that the AuthenticationManager will use for accessing the resources.
Public methodAddCredentials
Adds a set of new Credentials that the AuthenticationManager will use for accessing resources.
Public methodFindCredential(Uri)
Returns the token credential for the resource identified by the specified url.
Public methodFindCredential(Uri, AuthenticationType)
Returns the credential that supports the specified authentication type for the resource identified by the specified url.
Public methodFindServerInfo
Returns information about the server that is hosting at the specified url.
Public methodCode exampleGenerateCredentialAsync(Uri, GenerateTokenOptions)
Generates a token credential object asynchronously. You need to provide the service URL. This is a helper method typically called by the UI challenging the user.
Public methodCode exampleGenerateCredentialAsync(Uri, String, String, GenerateTokenOptions)
Generates a token credential object asynchronously. You need to provide the service URI, the username and the password. This is a helper method typically called by the UI challenging the user.
Public methodCode exampleGetCredentialAsync
Returns a Credential object of the specified type (credentialRequestInfo.AuthenticationType) that can be used to access the secured resource identified by the input url (credentialRequestInfo.Url). If required, the challenge method will be called and should return the expected credential object. If case of Token AuthenticationType, the user is typically challenged for a username and password which are used to generate a token. This method is typically called internally when a request fails due to an "invalid credentials" error.
Public methodCode exampleRegisterServer
Register secure servers and the token endpoints. The Authentication Manager makes its best guess to determine the location of the secure server and token endpoint so in most cases calling registerServers is not necessary. However if the location of your server or token endpoint is non-standard use this method to register the location. Additionally if portal uses the OAuth authentication, it needs to be registered by this method.
Public methodRemoveAllCredentials
Removes all stored credentials so the challenge handler will be called the next time access to a secured resource is needed.
Public methodRemoveAndRevokeAllCredentialsAsync
Removes all credentials from the cache and revokes tokens if appropriate.
Public methodRemoveAndRevokeCredentialAsync
Removes the given credential from the cache and revokes its token if appropriate.
Public methodRemoveCredential
Removes an existing credential so the challenge handler will be called the next time an access to the resources is needed.
Top
See Also