Click or drag to resize

OAuthClientCore Class

Core OAuth/OIDC Client Implementation. This instance does not rely on any upstream or realm settings to function. For an upstream-backed OAuth client, use OAuthClient instead.
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 OAuthClientCore : IOAuthClient, 
	IDisposable

The OAuthClientCore type exposes the following members.

Constructors
 NameDescription
Public methodOAuthClientCore DI constructor
Top
Properties
 NameDescription
Public propertyClientId The ClientId of the application.
Protected propertyCryptoRNG Gets or sets the configured random number generator
Protected propertyDiscoveryDocument Gets or sets the discover document fetched from the server
Protected propertyRestClientFactory Gets the IRestClientFactory service which is injected into this service
Protected propertyTokenHandler Gets the token handler
Protected propertyTokenValidationParameters Gets or sets the token validation parameters
Protected propertyTracer Gets the tracer to use for logging
Top
Methods
 NameDescription
Public methodAuthenticateApp Create an authenticated IClaimsPrincipal using a client credential
Public methodAuthenticateUser Authenticate a user using the username and password
Public methodChallengeAuthenticateUser Perform a x_challenge authentication request against the server
Protected methodCreatePrincipalFromResponse Create a principal from the response
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected methodDispose(Boolean)Releases the unmanaged resources used by the OAuthClientCore and optionally releases the managed resources
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.
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
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Protected methodGetJsonWebKeySet Get the JWKS information from the server
Protected methodGetNameClaimType Retrieves the claim type that is used for name validation in the TokenValidationParameters.
Protected methodGetNonce Gets a nonce value that is generated from the CSRNG in .NET and conforms to the OIDC specification.
Protected methodGetPrincipal Gets a IClaimsPrincipal using the request provided
Protected methodGetRestClient Gets the rest client from the factory for the auth provider (oauth)
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).
Protected methodGetToken Send the request to the OAUTH server and return the OAuthTokenResponse
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMapClaims Map claims from the tokenValidationResult into claims
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodRefresh Issues a refresh token request to the OAUTH server
Protected methodSetTokenValidationParameters Set the token validation parameter to be used
Protected methodSetupRestClientForDiscoveryRequest Setup the restClient for a discovery endpoint request
Protected methodSetupRestClientForJwksRequest Setup the restClient for a JWKS fetch request
Protected methodSetupRestClientForTokenRequest Setup the restClient for a token request
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Fields
 NameDescription
Protected field_OverrideDiscoveryDocumentUrls Override discovery document urls
Protected field_RetryTimes The retry times that are cached from GetRetryWaitTimes.
Protected fieldStatic memberADHOC_DISCOVERY_DOC_KEY 
Protected fieldStatic memberADHOC_JKWS_DOC_KEY 
Public fieldStatic memberAPP_SETTING_OVERRIDE_OIDC When used in the configuration settings - override the endpoints for oauth
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