Class RenamePasskeyUseCase
java.lang.Object
com.irurueta.authserver.authorization.application.passkeys.RenamePasskeyUseCase
Use case that renames a passkey of a user.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intLongest label accepted, in characters.private final PasskeyRepositoryPort that stores the passkeys. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
MAX_LABEL_LENGTH
public static final int MAX_LABEL_LENGTHLongest label accepted, in characters.- See Also:
-
passkeyRepository
Port that stores the passkeys.
-
-
Constructor Details
-
RenamePasskeyUseCase
public RenamePasskeyUseCase()
-
-
Method Details
-
execute
Renames a passkey; a passkey of another account is never touched.- Parameters:
username- name of the signed-in account.id- credential identifier.label- new label; it is trimmed.- Returns:
- the renamed passkey.
- Throws:
InvalidPasskeyLabelException- if the label is blank or longer thanMAX_LABEL_LENGTHonce trimmed.PasskeyNotFoundException- if the account has no passkey with that identifier.
-