AuthorizationGrantResult
OCP App SDK / AuthorizationGrantResult
AuthorizationGrantResult
Used to compose a response to the onAuthorizationGrant lifecycle request
Hierarchy
FormResult
.AuthorizationGrantResult
Index
Constructors
Properties
Methods
Constructors
constructor()
Signature
new AuthorizationGrantResult(redirectSection: string): AuthorizationGrantResult;
Parameters
Name | Type | Description |
---|---|---|
redirectSection | string | the section of the settings form the user will be redirected to |
Returns
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
Name | Type | Description |
---|---|---|
field | string | key to display the error under, as defined in the form schema |
error | string | message to display to the user |
Returns
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
Name | Type | Description |
---|---|---|
intent | Intent | one of the supported intents that will affect how the toast is displayed |
message | string | to display in the toast |
Returns
Inherited from: FormResult.addToast
Defined in: src/app/lib/FormResult.ts:13
Updated 2 months ago