Class PasskeyController
java.lang.Object
com.irurueta.authserver.authorization.api.web.passkeys.PasskeyController
- All Implemented Interfaces:
PasskeysApi
Manages the passkeys of the authenticated account (the operations of the contract). Registering one is not here:
it is the WebAuthn ceremony of the security chain, which the account page drives.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CurrentAccountResolverResolves the account of the request.private final DeletePasskeyUseCaseDeletes a passkey.private final ListPasskeysUseCaseLists the passkeys of an account.private final PasskeyDtoMapperMaps the passkeys onto the contract's DTOs.private final RenamePasskeyUseCaseRenames a passkey.private final StepUpGuardRequires a recent multi-factor sign-in before a passkey is deleted.Fields inherited from interface com.irurueta.authserver.authorization.api.web.v1.generated.api.PasskeysApi
PATH_DELETE_PASSKEY, PATH_LIST_PASSKEYS, PATH_RENAME_PASSKEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> deletePasskey(String id) Deletes a passkey of the authenticated account.Lists the passkeys of the authenticated account.org.springframework.http.ResponseEntity<Passkey> renamePasskey(String id, RenamePasskeyRequest request) Renames a passkey of the authenticated account.
-
Field Details
-
currentAccountResolver
Resolves the account of the request. -
listPasskeysUseCase
Lists the passkeys of an account. -
renamePasskeyUseCase
Renames a passkey. -
deletePasskeyUseCase
Deletes a passkey. -
stepUpGuard
Requires a recent multi-factor sign-in before a passkey is deleted. -
passkeyDtoMapper
Maps the passkeys onto the contract's DTOs.
-
-
Constructor Details
-
PasskeyController
public PasskeyController()
-
-
Method Details
-
listPasskeys
Lists the passkeys of the authenticated account.- Specified by:
listPasskeysin interfacePasskeysApi- Returns:
200 OKwith the passkeys, possibly none.
-
renamePasskey
public org.springframework.http.ResponseEntity<Passkey> renamePasskey(String id, RenamePasskeyRequest request) Renames a passkey of the authenticated account.- Specified by:
renamePasskeyin interfacePasskeysApi- Parameters:
id- credential identifier of the passkey.request- the new label.- Returns:
200 OKwith the renamed passkey.- Throws:
PasskeyNotFoundException- if the account has no such passkey.
-
deletePasskey
Deletes a passkey of the authenticated account.- Specified by:
deletePasskeyin interfacePasskeysApi- Parameters:
id- credential identifier of the passkey.- Returns:
204 No Content.- Throws:
PasskeyNotFoundException- if the account has no such passkey.InsufficientUserAuthenticationException- if the account has a confirmed second factor and the token does not show a recent multi-factor sign-in.
-