OathParser

Provides the ability to parse URI scheme into a convenient format to use with configuring a OathMechanism to generate OTP codes.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val ACCOUNT_NAME: String = "accountname"
The identity account name
Link copied to clipboard
val ALGORITHM: String = "algorithm"
The algorithm used for generating the OTP
Link copied to clipboard
private val ALLOWED_TYPES: Array<String>
Link copied to clipboard
val BG_COLOR: String = "b"
The identity color
Link copied to clipboard
val COUNTER: String = "counter"
The counter used to keep track of how many codes have been generated using this mechanism
Link copied to clipboard
val DIGITS: String = "digits"
The number of digits that the OTP should be
Link copied to clipboard
val IMAGE: String = "image"
The identity image
Link copied to clipboard
val ISSUER: String = "issuer"
The IDP that issued the URI
Link copied to clipboard
val PERIOD: String = "period"
The frequency with which the OTP updates
Link copied to clipboard
val POLICIES: String = "policies"
The Authenticator Policies.
Link copied to clipboard
val SCHEME: String = "scheme"
The protocol of the URI
Link copied to clipboard
val SECRET: String = "secret"
The secret used for generating the OTP
Link copied to clipboard
private val SLASH: String = "/"
Link copied to clipboard
private val TAG: String
Link copied to clipboard
val TYPE: String = "authority"
The type of OTP (TOTP or HOTP)
Link copied to clipboard
val UNTITLED: String = "Untitled"
Unknown identity
Link copied to clipboard
val VERSION: String = "version"
The URI API Version

Functions

Link copied to clipboard
protected fun containsNonEmpty(values: Map<String, String>, key: String): Boolean
Link copied to clipboard
protected open fun getBase64DecodedString(value: String): String
Link copied to clipboard
protected open fun getUriParameters(uriString: String): Map<String, String>
Link copied to clipboard
protected open fun isBase64Encoded(value: String): Boolean
Link copied to clipboard
fun map(uriScheme: String): Map<String, String>
Call through to map
Link copied to clipboard
protected open fun postProcess(values: Map<String, String>): Map<String, String>
Validates the parsed URI values
Link copied to clipboard
protected open fun split(s: String, sep: String): Array<String>