principal

fun principal(principal: Principal)

Sets an authenticated principal for this context.


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

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


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

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


fun <T : Principal> 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.