• BlackBerry Dynamics
  • Runtime library for Android applications
  • 12.1.1.43
GDAuthTokenCallback Interface Reference

Listener for handling the results of BlackBerry Dynamics authentication token requests. More...

Description

The results of BlackBerry Dynamics authentication token requests are handled by creating a class that implements this protocol.

BlackBerry Dynamics authentication tokens can be requested by utilizing a method in the GDUtility class.

For the token request programming interface, and general information about the mechanism, see the GDUtility class reference.

Public Member Functions

void onGDAuthTokenSuccess (final String token)
 Successful token request callback. More...
 
void onGDAuthTokenFailure (final int errCode, final String errMsg)
 Failed token request callback. More...
 

Member Function Documentation

◆ onGDAuthTokenSuccess()

void onGDAuthTokenSuccess ( final String  token)

This callback will be invoked when a new BlackBerry Dynamics authentication token has been generated. Token generation is always in response to a call to the getGDAuthToken method.

The method that is invoked could initiate sending of the token to the application server, out of band. The application server will then be able to utilize the token to authenticate the end user.

Parameters
tokenString containing the token.

◆ onGDAuthTokenFailure()

void onGDAuthTokenFailure ( final int  errCode,
final String  errMsg 
)

This callback will be invoked when a request for a BlackBerry Dynamics authentication token has failed. Information about the error condition is passed in the parameters.

The request will have been made by calling the getGDAuthToken method.

Invocation of this callback notifies the application that a token wasn't issued in response to the request.

Depending on the reason for failure, the function that is invoked could:

  • Retry, by requesting a token again.
  • Notify the user that this authentication mechanism isn't available.
Parameters
errCodeint code for the error condition that led to the failure of the token request.
CodeCondition
-1An error occurred during token generation or communication. Sending the same request later mightn't encounter the same condition, and could succeed.
-2The version of BlackBerry Dynamics server software installed at the enterprise doesn't support the authentication token mechanism.
errMsgString containing an error message that describes the error condition that led to the failure of the token request.