PushFactorPayload
public struct PushFactorPayload : FactorPayload
Describes the information required to create a Factor which type is Push.
-
A human readable description of this resource, up to 64 characters. For a push factor, this can be the device’s name.
Declaration
Swift
public let friendlyName: String
-
The unique SID identifier of the Service.
Declaration
Swift
public let serviceSid: String
-
Identifies the user, should be an UUID you should not use PII (Personal Identifiable Information) because the systems that will process this attribute assume it is not directly identifying information.
Declaration
Swift
public let identity: String
-
Type of the factor, push by default.
Declaration
Swift
public let factorType: FactorType
-
(Optional) Registration token generated by APNS when registering for remote notifications. Sending nil or empty will disable sending push notifications for challenges associated to this factor.
Declaration
Swift
public let pushToken: String?
-
Previously generated Access Token using the /accessTokens endpoint.
Declaration
Swift
public let accessToken: String
-
Custom metadata associated with the factor. This is added by the Device/SDK directly to allow for the inclusion of device information.
Declaration
Swift
public let metadata: [String : String]?
-
Creates a PushFactorPayload with the given parameters.
Declaration
Swift
public init(friendlyName: String, serviceSid: String, identity: String, pushToken: String?, accessToken: String, metadata: [String : String]? = nil)
Parameters
friendlyName
A human readable description of this resource, up to 64 characters. For a push factor, this can be the device’s name.
serviceSid
The unique SID identifier of the Service.
identity
Identifies the user, should be an UUID you should not use PII (Personal Identifiable Information) because the systems that will process this attribute assume it is not directly identifying information.
pushToken
(Optional) Registration token generated by APNS when registering for remote notifications. Sending nil or empty will disable sending push notifications for challenges associated to this factor.
accessToken
Previously generated Access Token using the /accessTokens endpoint.
metadata
Custom metadata associated with the factor. This is added by the Device/SDK directly to allow for the inclusion of device information.