Bearer token generator and authenticator