Class AuthorizationException

Authorization Exception

An error that can be returned to trigger an authorization card to be shown to the user.

 Card  
Service 
 . 
 newAuthorizationException 
 () 
  
 . 
 setAuthorizationUrl 
 ( 
 'http://auth.com/' 
 ) 
  
 . 
 setResourceDisplayName 
 ( 
 'Example Resource' 
 ) 
  
 . 
 throwException 
 (); 

Methods

Method Return type Brief description
String Prints the JSON representation of this object.
Authorization Exception Sets the authorization URL that user is taken to from the authorization prompt.
Authorization Exception The name of a function to call to generate a custom authorization prompt.
Authorization Exception Sets the name that is displayed to the user when asking for authorization.
void Triggers this exception to be thrown.

Detailed documentation

print Json()

Prints the JSON representation of this object. This is for debugging only.

Return

String


set Authorization Url(authUrl)

Sets the authorization URL that user is taken to from the authorization prompt. Required.

Parameters

Name Type Description
auth Url
String The authorization URL to set.

Return

Authorization Exception — This object, for chaining.


set Custom Ui Callback(callback)

The name of a function to call to generate a custom authorization prompt. Optional.

Parameters

Name Type Description
callback
String The name of the function that generates a custom authorization prompt.

Return

Authorization Exception — This object, for chaining.


set Resource Display Name(name)

Sets the name that is displayed to the user when asking for authorization. Required.

Parameters

Name Type Description
name
String The display name.

Return

Authorization Exception — This object, for chaining.


throw Exception()

Triggers this exception to be thrown.

Create a Mobile Website
View Site in Mobile | Classic
Share by: