OAuthProvider
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.2.0.0)
Identifies the identity provider that OAuthClient authenticates against.
4.2.0+- C#
- VB.NET
public enum OAuthProvider
Public Enum OAuthProvider
Fields
| Name | Description | Value |
|---|---|---|
| Entra | Microsoft Entra ID v2.0 (OpenID Connect). The authority is composed as {Authority}/{Tenant}/v2.0, where Authority is the instance host — null means https://login.microsoftonline.com — or that host with the tenant as its single path segment when Tenant is empty. Default scopes "openid profile email"; subject claim "oid", because sub is pairwise; tenant claim "tid". The expected tenant is resolved first and never from the token: it is the effective tenant — Tenant, or the Authority path segment when Tenant is empty — or, when that is a multi-tenant alias, whichever AllowedTenants value equals the token's tid. Only that resolved value is substituted into the "{tenantid}" template published by discovery, and tid is always checked against it. Email may be absent and is never marked verified. There is no revocation endpoint; RP-initiated logout uses the end-session endpoint. | |
| GitHub | GitHub OAuth App. OAuth 2.0 only: no discovery document, no ID token, no nonce. Identity comes from GET https://api.github.com/user and /user/emails. Default scopes "read:user user:email"; subject claim "id"; name claim "login". PKCE S256 is accepted on github.com and is supported by no GitHub Enterprise Server version. A client secret is always required; None is rejected. LoginHint maps to the "login" parameter. Revocation is DELETE /applications/{client_id}/token with HTTP Basic client credentials. Authority overrides https://github.com for Enterprise Server. | |
| GitLab | GitLab (OpenID Connect), on gitlab.com or a self-managed instance. Every endpoint and the issuer are composed from Authority, default https://gitlab.com; GitLab publishes a discovery document but the preset is used. Default scopes "openid profile email"; subject claim "sub"; name claim preferred_username, then nickname, then email, then name. The userinfo endpoint is always requested, because self-managed instances before roughly 16.6 put the profile claims there and not in the ID token. Email is present only when the user has a public email. PKCE S256 is accepted on every host. A refresh token is always issued and offline_access is not a GitLab scope, so OfflineAccess adds nothing. Prompt and LoginHint are not sent. None is accepted, for a non-confidential application. Revocation is RFC 7009 at {Authority}/oauth/revoke; there is no end-session endpoint. For a self-managed instance Authority is the external URL including any relative root path, which the issuer check compares exactly. | |
| Google Identity (OpenID Connect). Discovery at https://accounts.google.com/.well-known/openid-configuration. Default scopes "openid email profile"; subject claim "sub"; name claim "email". A refresh token is issued only with OfflineAccess (access_type=offline, plus prompt=consent to re-issue). The issuer is accepted as either "https://accounts.google.com" or "accounts.google.com". The hd claim is validated against the domain hint sent with the attempt - the DomainHint value when a handler set one, else DomainHint - and treated as optional when neither is set. A client secret is always required; None is rejected. | ||
| OAuth2 | A custom OAuth 2.0 or OpenID Connect provider. Endpoints come from Authority discovery and from a ProviderResolved handler, whose values win. Default scopes "openid profile email"; subject claim "sub"; name claim preferred_username, then email, then name. OpenID Connect validation — nonce, ID token, signature — applies when "openid" is among the requested scopes. PKCE S256 is sent by default. RFC 7009 revocation and RP-initiated logout with id_token_hint are supported. |
Used By
| Name | Description |
|---|---|
| OAuthAuthenticatedEventArgs.Provider | Returns the provider that authenticated the user. |
| OAuthAuthenticatingEventArgs.Provider | Returns the provider that authenticated the user. |
| OAuthAuthenticationFailedEventArgs.Provider | Returns the provider the attempt used. |
| OAuthEventArgs.Provider | Returns the provider this attempt used. |
| OAuthProviderResolvedEventArgs.Provider | Returns the provider whose endpoints were resolved. |
| OAuthSignInEventArgs.Provider | Returns the provider this attempt uses. |
| OAuthAuthorizationRequest.Provider | Returns the provider this attempt uses. |
| OAuthClient.Provider | Returns or sets the identity provider to authenticate against. |
| OAuthException.Provider | Returns the provider the attempt used. |
| OAuthIdentity.Provider | Returns the provider that authenticated this user. |
| OAuthPrincipal.Provider | Returns the provider that authenticated this user. |