class SignedTokenFactory implements SimpleTokenFactory {

    @Override
    public AttachmentAccessToken generateAttachmentAccessToken(String username, String blobId) {
        Preconditions.checkArgument(! Strings.isNullOrEmpty(blobId));
        ZonedDateTime expirationTime = zonedDateTimeProvider.get().plusMinutes(5);
        return AttachmentAccessToken.builder()
                .username(username)
                .blobId(blobId)
                .expirationDate(expirationTime)
                .signature(signatureHandler.sign(Joiner.on(AttachmentAccessToken.SEPARATOR)
                                                    .join(blobId,
                                                            username, 
                                                            DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expirationTime))))
                .build();
    }

    @Inject public  SignedTokenFactory(SignatureHandler signatureHandler, ZonedDateTimeProvider zonedDateTimeProvider);

}