AuthenticationHandler

class AuthenticationHandler : KoinComponent

認証・認可を処理するハンドラー JWTトークンの検証とパーミッションチェックを担当する

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
suspend fun authenticate(call: ApplicationCall): Either<AuthError, AuthResult>

認証を検証し、認証結果を取得する トークンの種類(ユーザー/サービス)に応じて適切な結果を返す

Link copied to clipboard
suspend fun authenticateAndCheckPermission(call: ApplicationCall, permission: String): Either<AuthError, AuthResult>

認証とパーミッションチェックを一度に行う

Link copied to clipboard
suspend fun checkPermission(authResult: AuthResult, permission: String): Either<AuthError, Unit>

パーミッションを検証する サービスアカウントの場合はBukkitパーミッションチェックをスキップする セキュリティ上の理由から、オフラインプレイヤーはパーミッションチェック不可とする

Link copied to clipboard
open fun getKoin(): Koin