Dev Guide
Dev GuideUser GuideGitHubNuGetDevCommunitySubmit a ticketLog In
GitHubNuGetDevCommunitySubmit a ticket

AuthorizationGrantResult

OCP App SDK / AuthorizationGrantResult

AuthorizationGrantResult

Used to compose a response to the onAuthorizationGrant lifecycle request

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor()

Signature

new AuthorizationGrantResult(redirectSection: string): AuthorizationGrantResult;

Parameters

NameTypeDescription
redirectSectionstringthe section of the settings form the user will be redirected to

Returns

AuthorizationGrantResult

Overrides: FormResult.constructor

Defined in: src/app/lib/AuthorizationGrantResult.ts:11

Properties

errors

Protected object = {}

Index signature

[field: string]: string[]

Type declaration

Inherited from: FormResult.errors

Defined in: src/app/lib/FormResult.ts:4

toasts

Protected {

`intent`: [`Intent`](app-sdk-api-reference-types-intent);
`message`: `string`;

}[] = []

Inherited from: FormResult.toasts

Defined in: src/app/lib/FormResult.ts:5

Methods

addError()

Add an error to display to the user for a particular form field (implicitly scoped to the redirected section)

Signature

addError(field: string, error: string): AuthorizationGrantResult;

Parameters

NameTypeDescription
fieldstringkey to display the error under, as defined in the form schema
errorstringmessage to display to the user

Returns

AuthorizationGrantResult

Defined in: src/app/lib/AuthorizationGrantResult.ts:20

addToast()

Display a toast to user, such as, "Successfully authenticated with " or
"Authentication failed, please check your credentials and try again."

Signature

addToast(intent: Intent, message: string): AuthorizationGrantResult;

Parameters

NameTypeDescription
intentIntentone of the supported intents that will affect how the toast is displayed
messagestringto display in the toast

Returns

AuthorizationGrantResult

Inherited from: FormResult.addToast

Defined in: src/app/lib/FormResult.ts:13