principal

fun principal(principal: Any)

Sets an authenticated principal for this context.


fun principal(provider: String? = null, principal: Any)

Sets an authenticated principal for this context from provider with name provider.


inline fun <T : Any> principal(provider: String? = null): T?

Retrieves a principal of the type T from provider with name provider, if any.


fun <T : Any> principal(provider: String?, klass: KClass<T>): T?

Retrieves a principal of the type T, if any.


Deprecated (with error)

Use accessor methods instead

Retrieves an authenticated principal, or returns null if a user isn't authenticated.