LocalAuthenticationProvider

class LocalAuthenticationProvider(name: String, privateKey: String, publicKey: String?, keyManager: KeyManagerInterface, keyId: String, username: String, customAttributes: Map<String, Any>? = null) : AuthenticationProvider

Authentication provider for generating authentication info using a locally stored private key.

Parameters

name

provider name. This name will be prepend to the generated UUID in JWT sub.

privateKey

PEM encoded RSA private key.

publicKey

PEM encoded RSA public key. This is optional. If not provided then will be derived from the private key.

keyManager

KeyManagerInterface instance to use for signing authentication info.

keyId

key ID of the private key used to sign the authentication info.

username

username be associated with the issued authentication info.

customAttributes

custom attributes to add to the issued authentication info.

Constructors

Link copied to clipboard
constructor(name: String, privateKey: String, publicKey: String?, keyManager: KeyManagerInterface, keyId: String, username: String, customAttributes: Map<String, Any>? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend override fun getAuthenticationInfo(): AuthenticationInfo

Generates and returns an authentication information.

Link copied to clipboard
open override fun reset()

Resets internal state and releases any associated resources.