Package doist.ffs.auth

Types

Link copied to clipboard
data class Access(resource: Resource, permissions: Collection<Permission>)
Link copied to clipboard
abstract class AccessPrincipal(accesses: Collection<Access>) : Principal

An authenticated access to specific resources/permissions.

Link copied to clipboard
object Argon2Password
Link copied to clipboard
class AuthorizationException : RuntimeException
Link copied to clipboard
class BearerAuthenticationProvider : AuthenticationProvider

Represents a Bearer authentication provider. Based on io.ktor.server.auth.BasicAuthenticationProvider.

Link copied to clipboard
data class BearerCredential(token: String) : Credential
Link copied to clipboard
enum Permission : Enum<Permission>
Link copied to clipboard
sealed class Resource
Link copied to clipboard
data class Session(userId: Long)
Link copied to clipboard
data class TokenPrincipal(projectId: Long, permission: Permission) : AccessPrincipal

An authenticated API access.

Link copied to clipboard
data class UserPrincipal(id: Long, organizationPermissions: Map<Long, Collection<Permission>>, projectPermissions: Map<Long, Collection<Permission>>) : AccessPrincipal

An authenticated user.

Functions

Link copied to clipboard
fun authorize(condition: Boolean?)
Link copied to clipboard
fun Authentication.Configuration.bearer(name: String? = null, configure: BearerAuthenticationProvider.Configuration.() -> Unit)

Installs Bearer Authentication mechanism.

Link copied to clipboard
fun ApplicationRequest.bearerAuthenticationCredentials(): BearerCredential?

Retrieves Bearer authentication credentials for this ApplicationRequest.

Properties

Link copied to clipboard
val RoleEnum.permissions: Collection<Permission>