Skip to content

MarkNenadov/KPasswordless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kpasswordless - A Kotlin client for passwordless.dev

A Kotlin client for the passwordless.dev API (https://passwordless.dev/).

Latest release: [v0.0.3]

Note: Between registerToken() and signIn() you will need to make the front-end signInWtih*() call that the passwordless.dev docs mention.

Service


KPasswordlessIdentity {
    userName: String
    userId: String
    displayName: String;
}

KPasswordlessSignIn {
    isSuccess: Boolean
    userId: String
    timestamp: String
    origin: String
    device: String
    country: String
    nickname: String
    expiresAt: String
    credentialId: String
    type: String
    rpId: String
}

class KpasswordlessCredential {
    var id: String
    var type: String
    var publicKey: String
    var userHandle: String
    var origin: String
    var country: String
    var device: String
}

interface KpasswordlessService {
    fun registerToken( privateKey: String, identity: KPasswordlessIdentity ): String
    fun addAliases( privateKey: String, identity: KPasswordlessIdentity, aliases: List<String> ): Boolean
    fun signin( privateKey: String, token: String ): KPasswordlessSignIn
    fun deleteCredentials(privateKey: String, credentialId: String): Boolean
}

Runtime Exceptions:

  • KpasswordlessServiceException

Tech

Kotlin, IntelliJ, Maven

About

A Kotlin client for the passwordless.dev API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages