@Override
    public PasswordlessAuthenticationToken saveToken(final PasswordlessUserAccount passwordlessAccount,
                                                     final PasswordlessAuthenticationRequest passwordlessRequest,
                                                     final PasswordlessAuthenticationToken authnToken) {
        return FunctionUtils.doUnchecked(() -> {
            val record = JpaPasswordlessAuthenticationEntity.builder()
                .username(authnToken.getUsername())
                .token(encodeToken(authnToken))
                .expirationDate(authnToken.getExpirationDate())
                .build();
            LOGGER.debug("Saving token [{}]", record);
            val result = entityManager.merge(record);
            return authnToken.withId(result.getId());
        });
    }
This is {@link JpaPasswordlessTokenRepository}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-passwordless-jpa/src/main/java/org/apereo/cas/impl/token/JpaPasswordlessTokenRepository.java