class QueryParameterAccessTokenAuthenticationStrategy implements AuthenticationStrategy {

    @Override
    public Mono<MailboxSession> createMailboxSession(HttpServerRequest httpRequest) {
        return Mono.justOrEmpty(getAccessToken(httpRequest))
            .filter(tokenManager::isValid)
            .map(AttachmentAccessToken::getUsername)
            .map(Username::of)
            .map(mailboxManager::createSystemSession);
    }

    @Inject @VisibleForTesting  QueryParameterAccessTokenAuthenticationStrategy(SimpleTokenManager tokenManager, MailboxManager mailboxManager);

}