OathFactory

Responsible for generating instances of OathMechanism. Understands the concept of a version number associated with a Token and will parse the URI according to this.

Constructors

Link copied to clipboard
constructor(context: Context, storageClient: StorageClient)
Creates the MechanismFactory and loads the available mechanism information.

Properties

Link copied to clipboard
private open var context: Context
Link copied to clipboard
private val parser: OathParser
Link copied to clipboard
private open var storageClient: StorageClient
Link copied to clipboard
private val TAG: String
private val TAG: String

Functions

Link copied to clipboard
private open fun buildOathMechanism(mechanismUID: String, map: Map<String, String>, listener: FRAListener<Mechanism>)
Link copied to clipboard
fun createFromUri(uri: String, listener: FRAListener<Mechanism>)
Convert a URL to the Mechanism it represents, including extracting the account.
Link copied to clipboard
protected open fun createFromUriParameters(version: Int, @NonNull mechanismUID: String, @NonNull map: Map<String, String>, @NonNull listener: FRAListener<Mechanism>)
Method used to create the Mechanism represented by a given URI.
Link copied to clipboard
open fun getContext(): Context
Get a context that this factory was created from.
Link copied to clipboard
open fun getFromMap(map: Map<String, String>, name: String, defaultValue: String): String
Get a single value from the map.
Link copied to clipboard
protected open fun getParser(): MechanismParser
Return the MechanismParser subclass used by the factory for a particular Mechanism type.