Click or drag to resize

OAuthClient Class

An implementation of the OAuth client
Inheritance Hierarchy
SystemObject
  SanteDB.Client.OAuthOAuthClientCore
    SanteDB.Client.OAuthOAuthClient

Namespace: SanteDB.Client.OAuth
Assembly: SanteDB.Client (in SanteDB.Client.dll) Version: 3.0.2081-alpha+027e4605b77f83de5445cbcd55717223932d2452
Syntax
public class OAuthClient : OAuthClientCore

The OAuthClient type exposes the following members.

Constructors
 NameDescription
Public methodOAuthClient DI constructor
Top
Properties
 NameDescription
Public propertyClientId The ClientId of the application.
(Inherited from OAuthClientCore)
Protected propertyCryptoRNG Gets or sets the configured random number generator
(Inherited from OAuthClientCore)
Protected propertyDiscoveryDocument Gets or sets the discover document fetched from the server
(Inherited from OAuthClientCore)
Protected propertyRestClientFactory Gets the IRestClientFactory service which is injected into this service
(Inherited from OAuthClientCore)
Protected propertyTokenHandler Gets the token handler
(Inherited from OAuthClientCore)
Protected propertyTokenValidationParameters Gets or sets the token validation parameters
(Inherited from OAuthClientCore)
Protected propertyTracer Gets the tracer to use for logging
(Inherited from OAuthClientCore)
Top
Methods
 NameDescription
Public methodAuthenticateApp Create an authenticated IClaimsPrincipal using a client credential
(Inherited from OAuthClientCore)
Public methodAuthenticateUser Authenticate a user using the username and password
(Inherited from OAuthClientCore)
Public methodChallengeAuthenticateUser Perform a x_challenge authentication request against the server
(Inherited from OAuthClientCore)
Protected methodCreatePrincipalFromResponse Create a principal from the response
(Inherited from OAuthClientCore)
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from OAuthClientCore)
Protected methodDispose(Boolean)
(Inherited from OAuthClientCore)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodExecuteWithRetryT Executes func with retry specified in GetRetryWaitTimes, sleeping the thread in between.
(Inherited from OAuthClientCore)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Protected methodGetDiscoveryDocument Get the OpenIdConnectDiscoveryDocument from the remote OAUTH server
(Inherited from OAuthClientCore)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Protected methodGetJsonWebKeySet Get the JWKS information from the server
(Inherited from OAuthClientCore)
Protected methodGetNameClaimType Retrieves the claim type that is used for name validation in the TokenValidationParameters.
(Inherited from OAuthClientCore)
Protected methodGetNonce Gets a nonce value that is generated from the CSRNG in .NET and conforms to the OIDC specification.
(Inherited from OAuthClientCore)
Protected methodGetPrincipal Gets a IClaimsPrincipal using the request provided
(Inherited from OAuthClientCore)
Protected methodGetRestClient Gets the rest client from the factory for the auth provider (oauth)
(Inherited from OAuthClientCore)
Protected methodGetRetryWaitTimes Gets an array of wait times (in milliseconds) to wait during a retry operation. The size of the returned array denotes how many times to retry. This is used by ExecuteWithRetryT(FuncT, FuncException, Boolean).
(Inherited from OAuthClientCore)
Protected methodGetToken Contacts the OAUTH server with request
(Overrides OAuthClientCoreGetToken(OAuthTokenRequest, IEnumerableIClaim))
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMapClaims Maps the claims from the tokenValidationResult to the claims
(Overrides OAuthClientCoreMapClaims(TokenValidationResult, OAuthTokenResponse, ListIClaim))
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodRefresh Issues a refresh token request to the OAUTH server
(Inherited from OAuthClientCore)
Protected methodSetTokenValidationParameters Set the token validation parameters based on the configuration
(Overrides OAuthClientCoreSetTokenValidationParameters)
Protected methodSetupRestClientForDiscoveryRequest Setup the restClient for a discovery endpoint request
(Inherited from OAuthClientCore)
Protected methodSetupRestClientForJwksRequest Setup the restClient for a JWKS fetch request
(Inherited from OAuthClientCore)
Protected methodSetupRestClientForTokenRequest Setup this class to send a token request
(Overrides OAuthClientCoreSetupRestClientForTokenRequest(IRestClient, OAuthTokenRequest, IEnumerableIClaim))
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Protected methodUpstreamRealmChanged Event handler when the upstream realm has changed
Protected methodUpstreamRealmChanging handler for when the upstream realm has changed
Top
Fields
 NameDescription
Protected field_OverrideDiscoveryDocumentUrls Override discovery document urls
(Inherited from OAuthClientCore)
Protected field_RetryTimes The retry times that are cached from GetRetryWaitTimes.
(Inherited from OAuthClientCore)
Top
Extension Methods
 NameDescription
Public Extension MethodConvertTReturn The purpose of this method is to convert object me to TReturn. Why? Because if you have an instance of Act that actually needs to be a SubstanceAdministration we can't just cast so we have to copy.
(Defined by ExtensionMethods)
Public Extension MethodWithControl With control parameter is used as a wrapper for _ parameters
(Defined by QueryFilterExtensions)
Top
See Also