PushCredential

@Serializable
data class PushCredential(val id: String = UUID.randomUUID().toString(), val userId: String? = null, val resourceId: String = UUID.randomUUID().toString(), val issuer: String, val displayIssuer: String = issuer, val accountName: String, val displayAccountName: String = accountName, val serverEndpoint: String, val sharedSecret: String, val createdAt: Date = Date(), val imageURL: String? = null, val backgroundColor: String? = null, val policies: String? = null, var lockingPolicy: String? = null, var isLocked: Boolean = false, val platform: String = PushPlatform.PING_AM.name)

Represents a push credential for receiving push notifications. This model holds all necessary information to identify and interact with push notifications.

Constructors

Link copied to clipboard
constructor(id: String = UUID.randomUUID().toString(), userId: String? = null, resourceId: String = UUID.randomUUID().toString(), issuer: String, displayIssuer: String = issuer, accountName: String, displayAccountName: String = accountName, serverEndpoint: String, sharedSecret: String, createdAt: Date = Date(), imageURL: String? = null, backgroundColor: String? = null, policies: String? = null, lockingPolicy: String? = null, isLocked: Boolean = false, platform: String = PushPlatform.PING_AM.name)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The account name (username) associated with this credential. Should be unique per user.

Link copied to clipboard

Returns the authentication endpoint for this credential. This is used to authenticate the user via push notification with the PingAM servers.

Link copied to clipboard
val backgroundColor: String? = null

Optional background color for the credential.

Link copied to clipboard
@Serializable(with = DateSerializer::class)
val createdAt: Date

The timestamp when this credential was created.

Link copied to clipboard

The account name (username) associated with this credential, editable by the user.

Link copied to clipboard

The name of the issuer for this credential, editable by the user.

Link copied to clipboard
val id: String

Unique identifier for the credential (local ID).

Link copied to clipboard
val imageURL: String? = null

Optional URL for the issuer's logo or image.

Link copied to clipboard
@EncodeDefault
var isLocked: Boolean

Indicates whether the credential is locked.

Link copied to clipboard

The name of the issuer for this credential. Should be a unique identifier for the service or application issuing the credential.

Link copied to clipboard

Optional name of the Policy locking the credential.

Link copied to clipboard

The platform for which this credential is intended (e.g., PING_AM).

Link copied to clipboard
val policies: String? = null

Optional Authenticator Policies in a JSON String format for the credential.

Link copied to clipboard

Returns the registration endpoint for this credential. This is used to register the device with the PingAM servers.

Link copied to clipboard

Server-side device identifier. Default to id if resourceId is not provided. In PingAM, resourceId is the same as the local id.

Link copied to clipboard

The endpoint where authentication responses should be sent.

Link copied to clipboard

The secret key used for cryptographic operations.

Link copied to clipboard

Returns the update endpoint for this credential. This is used to refresh or update the device token with the PingAM servers.

Link copied to clipboard
val userId: String? = null

User identifier on the server.

Functions

Link copied to clipboard
fun lockCredential(policyName: String)

Lock this credential due to policy violations.

Link copied to clipboard
fun toJson(): String

Converts this credential to a JSON string representation.

Link copied to clipboard
open override fun toString(): String

Returns a string representation of this credential.

Link copied to clipboard

Unlock this credential. Clears any locking policy information.