AuthorizationGrantResult
OCP App SDKOCP App SDK
OCP App SDKOCP App SDK / AuthorizationGrantResult
Class: AuthorizationGrantResult
Defined in: src/app/lib/AuthorizationGrantResult.ts:7
Used to compose a response to the onAuthorizationGrant lifecycle request
Extends
- `FormResult`FormResult
Constructors
Constructor
Defined in: src/app/lib/AuthorizationGrantResult.ts:11
Parameters
redirectSection
string
the section of the settings form the user will be redirected to
Returns
AuthorizationGrantResult
Overrides
`FormResult`FormResult.`constructor`constructor
Properties
errors
Defined in: src/app/lib/FormResult.ts:4
Index Signature
[field: string]: string[]
Inherited from
`FormResult`FormResult.`errors`errors
toasts
Defined in: src/app/lib/FormResult.ts:5
intent
message
Inherited from
`FormResult`FormResult.`toasts`toasts
Methods
addError()
Defined in: src/app/lib/AuthorizationGrantResult.ts:20
Add an error to display to the user for a particular form field (implicitly scoped to the redirected section)
Parameters
field
string
key to display the error under, as defined in the form schema
error
string
message to display to the user
Returns
this
addToast()
Defined in: src/app/lib/FormResult.ts:13
Display a toast to user, such as, "Successfully authenticated with <Integration>" or "Authentication failed, please check your credentials and try again."
Parameters
intent
`Intent`Intent
one of the supported intents that will affect how the toast is displayed
message
string
to display in the toast
Returns
this
Inherited from
`FormResult`FormResult.`addToast`addToast