• BlackBerry Dynamics
  • Runtime library for Android applications
  • 12.0.1.79
CredentialsProfile Class Reference

User Credential profile. More...

Description

This class is used to represent a User Credential profile (UCP) from the enterprise BlackBerry Dynamics management console.

See also
com.good.gd.pki package reference for an overview of User Credentials Profiles.

Classes

enum  State
 UCP states. More...
 
enum  Type
 UCP types. More...
 

Public Member Functions

String getId ()
 Get the identifier. More...
 
State getState ()
 Get the current state. More...
 
String getType ()
 Get the profile type. More...
 
Type getTypeEnum ()
 Get the profile type. More...
 
String getName ()
 Get the display name. More...
 
Boolean getRequired ()
 Get the value of the required flag. More...
 
String getProviderSettings ()
 Get any additional settings from the credential provider. More...
 
List< CredentialgetCredentials ()
 Get the credentials in a UCP. More...
 
int getDaysUntilExpiry ()
 Get days until the next credential expires. More...
 
int getDaysUntilRenewalDue ()
 Get days until the next credential is due for renewal. More...
 
void beginEnrolment ()
 Begin enrolment for this User Credential profile. More...
 

Static Public Member Functions

static final void register (Type type)
 Receive notifications for User Credential profile changes. More...
 
static final void unregister (Type type)
 Disable notifications for User Credential profile changes. More...
 
static Map< String, CredentialsProfilegetMap ()
 List all User Credential profiles. More...
 
static State getState (Intent intent)
 Get the state from a UCP event. More...
 
static String getId (Intent intent)
 Get the identifier from a UCP event. More...
 
static String getName (Intent intent)
 Get the display name from a UCP event. More...
 
static boolean getRequired (Intent intent)
 Get the required flag from a UCP event. More...
 
static String getProviderSettings (Intent intent)
 Get the provider settings from a UCP event. More...
 
static void beginEnrolment (Type type)
 Begin enrolment for all User Credential profiles of the same type. More...
 
static void reset (Type type)
 Reset all the User Credential profiles of the same type. More...
 

Static Public Attributes

static final String GD_CREDENTIAL_PROFILE_STATE_CHANGE_ACTION = "com.good.gd.pki.CREDENTIAL_PROFILE_EVENT"
 Intent Filter key for UCP state change events. More...
 

Member Function Documentation

◆ register()

static final void register ( Type  type)
static

Broadcast a GD_CREDENTIAL_PROFILE_STATE_CHANGE_ACTION Intent when an app-based User Credential profile (UCP) changes state.

For historical reasons app-based UCP state changes are automatically registered. If not interested in app-based UCP state changes, call unregister().

◆ unregister()

static final void unregister ( Type  type)
static

Switch off GD_CREDENTIAL_PROFILE_STATE_CHANGE_ACTION Intent broadcasts when an app-based User Credential profile (UCP) changes state.

◆ getId() [1/2]

String getId ( )
Returns
String containing the unique identifier of the UCP.

◆ getState() [1/2]

State getState ( )
Returns
CredentialsProfile.State value for the current state of the UCP.

◆ getType()

String getType ( )
Deprecated:
This is deprecated and may be removed in a future release. Use getTypeEnum() instead.

If "localCertProvider", then the system will decide which profile will manage the credential based on certificate properties configured in the app-based UCP.

If "localCertProvider2", then the app must specify the profile identifier when importing the credential.

If "DeviceKeyStore", then this profile represents a Native Keystore UCP.

Returns
String containing an identifier of the profile type.

◆ getTypeEnum()

Type getTypeEnum ( )

Return the kind of User Credential profile (UCP).

Returns
Type representing the profile family.

◆ getName() [1/2]

String getName ( )
Returns
String containing the display name of the UCP. The display name is suitable for use in the application user interface.

◆ getRequired() [1/2]

Boolean getRequired ( )
Returns
Boolean value for whether a valid credential must be imported.

◆ getProviderSettings() [1/2]

String getProviderSettings ( )

Additional settings can be attached to a UCP by the credential provider. Attachment takes place at the BlackBerry Dynamics enterprise management console. The settings are conveyed by BlackBerry Dynamics, but are otherwise opaque to the infrastructure and can be in any format. For example, the settings could be a JavaScript Object Notation (JSON) string.

Returns
String containing the additional settings, or null if no settings were attached.

◆ getMap()

static Map<String, CredentialsProfile> getMap ( )
static

This class method returns the list of User Credential profiles that are assigned to the current end user. Assignment will have been made in the enterprise BlackBerry Dynamics management console. The list can be empty, if there is no User Credential profile assigned to the end user.

The list is returned as an unmodifiable Java Map collection in which:

  • Each key is a String containing the identifier of a UCP.
  • Each mapped value is a CredentialsProfile object from which the details and associated credentials can be read.
Returns
Map<String,CredentialsProfile> collection of UCP identifiers and details.

◆ getCredentials()

List<Credential> getCredentials ( )

This instance method is an accesor for the credentials in the UCP that the instance represents. The list will include credentials that have been imported or are otherwise available. The list can be empty, if no credentials are associate with the UCP.

Returns
List<Credential> with an entry for each credential associated with the UCP.
See also
com.good.gd.pki package reference for details of the UCP configuration structure.

◆ getState() [2/2]

static State getState ( Intent  intent)
static

This method is a helper that returns the state from a notification Intent.

Parameters
intentIntent that was sent by local broadcast for a UCP event.
Returns
CredentialsProfile.State constant.

◆ getId() [2/2]

static String getId ( Intent  intent)
static

This method is a helper that returns the UCP identifier from a notification Intent.

Parameters
intentIntent that was sent by local broadcast for a UCP event.
Returns
String containing the identifier.

◆ getName() [2/2]

static String getName ( Intent  intent)
static

This method is a helper that returns the UCP display name from a notification Intent.

Parameters
intentIntent that was sent by local broadcast for a UCP event.
Returns
String containing the display name.

◆ getRequired() [2/2]

static boolean getRequired ( Intent  intent)
static

This method is a helper that returns the UCP required flag from a notification Intent.

Parameters
intentIntent that was sent by local broadcast for a UCP event.
Returns
String containing the flag.

◆ getProviderSettings() [2/2]

static String getProviderSettings ( Intent  intent)
static

This method is a helper that returns the UCP provider settings from a notification Intent.

Parameters
intentIntent that was sent by local broadcast for a UCP event.
Returns
String containing the provider settings.

◆ getDaysUntilExpiry()

int getDaysUntilExpiry ( )
Returns
int days until the next credential expires. If zero, all credentials have expired.

◆ getDaysUntilRenewalDue()

int getDaysUntilRenewalDue ( )
Returns
int days until the next credential is due to be renewed. If zero, all credentials are overdue.

◆ beginEnrolment() [1/2]

void beginEnrolment ( )

Call this asynchronous funtion to initiate any steps that may be required to complete a pending enrolment for this UCP. Other pending UCPs will not be processed. The UCP may require user interaction. UCP state will change to GDCredentialsProfileStateImported upon successful setup or enrolment.

◆ beginEnrolment() [2/2]

static void beginEnrolment ( Type  type)
static

Call this asynchronous funtion to initiate any steps that may be required to complete pending enrolments, if any, for the given family of UCPs. Other pending UCP types will not be processed. The UCPs may require user interaction. UCP state will change to GDCredentialsProfileStateImported upon successful enrolment.

Parameters
typeof UCPs to initiate setup.

◆ reset()

static void reset ( Type  type)
static

Call this function to remove all credentials managed by UCPs of a specific type. Credentials within the device keystore will not be deleted however they will no longer be used by any Dynamics application. Credentials within the Dynamics keystore will be deleted.

The profile will be reset to GDCredentialsProfileStateImportDue.

Parameters
typeof UCP to reset.

Member Data Documentation

◆ GD_CREDENTIAL_PROFILE_STATE_CHANGE_ACTION

final String GD_CREDENTIAL_PROFILE_STATE_CHANGE_ACTION = "com.good.gd.pki.CREDENTIAL_PROFILE_EVENT"
static

Use this value as the Intent Filter key to register a broadcast receiver that will be notified when there is a change to the state or configuration of a UCP.

See also
com.good.gd.pki package reference.
GDAndroid registerReceiver reference documentation.