AuthenticationApi

class AuthenticationApi

Interacts with the server API.

Constructors

AuthenticationApi
Link copied to clipboard
fun AuthenticationApi()

Types

Companion
Link copied to clipboard
object Companion

Properties

client
Link copied to clipboard
private val client: OkHttpClient

Functions

formatCookie
Link copied to clipboard
private fun formatCookie(sessionId: String): String
getKeys
Link copied to clipboard
fun getKeys(sessionId: String): ApiResult<List<Credential>>
jsonRequestBody
Link copied to clipboard
private fun jsonRequestBody(body: JsonWriter.() -> Unit): RequestBody
objectValue
Link copied to clipboard
private fun JsonWriter.objectValue(body: JsonWriter.() -> Unit)
parseCredentialDescriptors
Link copied to clipboard
private fun parseCredentialDescriptors(reader: JsonReader): List<PublicKeyCredentialDescriptor>
parseError
Link copied to clipboard
private fun parseError(body: ResponseBody): String
parseParameters
Link copied to clipboard
private fun parseParameters(reader: JsonReader): List<PublicKeyCredentialParameters>
parsePublicKeyCredentialCreationOptions
Link copied to clipboard
private fun parsePublicKeyCredentialCreationOptions(body: ResponseBody): PublicKeyCredentialCreationOptions
parsePublicKeyCredentialRequestOptions
Link copied to clipboard
private fun parsePublicKeyCredentialRequestOptions(body: ResponseBody): PublicKeyCredentialRequestOptions
parseRp
Link copied to clipboard
private fun parseRp(reader: JsonReader): PublicKeyCredentialRpEntity
parseSelection
Link copied to clipboard
private fun parseSelection(reader: JsonReader): AuthenticatorSelectionCriteria
parseSessionId
Link copied to clipboard
private fun parseSessionId(cookie: String): String
parseUser
Link copied to clipboard
private fun parseUser(reader: JsonReader): PublicKeyCredentialUserEntity
parseUserCredentials
Link copied to clipboard
private fun parseUserCredentials(body: ResponseBody): List<Credential>
password
Link copied to clipboard
fun password(sessionId: String, password: String): ApiResult<Unit>
registerRequest
Link copied to clipboard
fun registerRequest(sessionId: String): ApiResult<PublicKeyCredentialCreationOptions>
registerResponse
Link copied to clipboard
fun registerResponse(sessionId: String, response: AuthenticatorAttestationResponse): ApiResult<List<Credential>>
removeKey
Link copied to clipboard
fun removeKey(sessionId: String, credentialId: String): ApiResult<Unit>
result
Link copied to clipboard
private fun <T> Response.result(data: Response.() -> T): ApiResult<T>
signinRequest
Link copied to clipboard
fun signinRequest(sessionId: String, credentialId: String?): ApiResult<PublicKeyCredentialRequestOptions>
signinResponse
Link copied to clipboard
fun signinResponse(sessionId: String, response: AuthenticatorAssertionResponse): ApiResult<List<Credential>>
throwResponseError
Link copied to clipboard
private fun throwResponseError(response: Response, message: String): Nothing
username
Link copied to clipboard
fun username(username: String): ApiResult<Unit>