Table of Contents

Class OAuthApp

Namespace
BiExcellence.OpenBi.Api.OAuthApps
Assembly
BiExcellence.OpenBi.Api.Client.dll

A registered OAuth app: a third-party client that signs users in through oauth/authorize and acts as each of them in turn - never as its owner. Its Id is the client_id it sends there and to oauth/token. Compare IApiKey, which always acts as the one user it belongs to.

public sealed record OAuthApp : IOAuthApp
Inheritance
object
OAuthApp
Implements

Properties

Created

When the app was registered. Set by the server.

[JsonPropertyName("created")]
public DateTimeOffset Created { get; init; }

Property Value

DateTimeOffset

Id

The app's client_id. Generated by the server on create; ignored in a request.

[JsonPropertyName("id")]
public string? Id { get; init; }

Property Value

string

IsPublic

A public client - a single-page or native app, which cannot keep a secret - has none and proves itself with PKCE alone. A confidential one (the default) has a secret as well.

[JsonPropertyName("isPublic")]
public bool IsPublic { get; init; }

Property Value

bool

LastUsed

When a token was last issued through the app, null if never. Set by the server.

[JsonPropertyName("lastUsed")]
public DateTimeOffset? LastUsed { get; init; }

Property Value

DateTimeOffset?

Name

The app's display name. Required.

[JsonPropertyName("name")]
public string? Name { get; init; }

Property Value

string

RedirectUris

Where oauth/authorize may send the user back to, matched exactly. At least one; absolute, without a fragment; https, http only on a loopback host, or a private-use scheme in reverse domain notation.

[JsonPropertyName("redirectUris")]
public IReadOnlyList<string>? RedirectUris { get; init; }

Property Value

IReadOnlyList<string>

Scope

The most a token issued through the app may carry: permission ids, space delimited. Empty or null means no limit beyond what the signed-in user holds.

[JsonPropertyName("scope")]
public string? Scope { get; init; }

Property Value

string

Secret

The app's client_secret, in the one response that generates it - a create, a switch from public to confidential, or CreateOAuthAppSecretAsync(IOpenBiApiClient, string, CancellationToken) - and null in every other: the server keeps only a hash. Ignored in a request.

[JsonPropertyName("secret")]
public string? Secret { get; init; }

Property Value

string

UserId

The username of the user who registered the app and manages it. Always the calling user, unless the caller holds openbi.user.write; left unset on an update, the owner stays.

[JsonPropertyName("userId")]
public string? UserId { get; init; }

Property Value

string