SingleValueCallback
@objc(FRSingleValueCallback)
open class SingleValueCallback : Callback
SingleValueCallback is a base Callback implementation that has single user input value. Any Callback that accepts single value from user interaction without OpenAM’s validation with policies may inherit from this class.
-
String value of inputName attribute in Callback response
Declaration
Swift
@objc public var inputName: String?
-
String value of prompt attribute in Callback response; prompt is usually human readable text that can be displayed in UI
Declaration
Swift
@objc public var prompt: String?
-
Unique identifier for this particular callback in Node
Declaration
Swift
public var _id: Int?
-
Designated initialization method for SingleValueCallback
Note
Any Callback inherits from this class may override init method to define any additional instance property value.
Throws
AuthError.invalidCallbackResponse for invalid callback responseDeclaration
Swift
public required init(json: [String : Any]) throws
Parameters
json
JSON object of SingleValueCallback
-
Sets input value in Callback with generic type
Declaration
Swift
@objc(setInputValue:) public func setValue(_ val: Any?)
Parameters
val
value to be set for Callback’s input
-
Returns input value in Callback with generic type
Declaration
Swift
@objc(getInputValue) public func getValue() -> Any?
Return Value
value that was set for Callback’s input
-
Builds JSON request payload for the Callback
Note
Any Callback inherits from this class may override buildResponse() method to construct the payload with any additional input value.
Declaration
Swift
open override func buildResponse() -> [String : Any]
Return Value
JSON request payload for the Callback