def _get_verifier(): """Returns a verifier for ASAP JWT tokens basd on application settings""" retriever_cls = current_app.config.get( 'ASAP_KEY_RETRIEVER_CLASS', atlassian_jwt_auth.HTTPSPublicKeyRetriever) retriever = retriever_cls( base_url=current_app.config.get('ASAP_PUBLICKEY_REPOSITORY')) return atlassian_jwt_auth.JWTAuthVerifier(retriever)
def _get_verifier(): """Return a verifier for ASAP JWT tokens based on settings""" retriever_cls = getattr(settings, 'ASAP_KEY_RETRIEVER_CLASS', atlassian_jwt_auth.HTTPSPublicKeyRetriever) retriever = retriever_cls( base_url=getattr(settings, 'ASAP_PUBLICKEY_REPOSITORY')) return atlassian_jwt_auth.JWTAuthVerifier(retriever)
def _setup_jwt_auth_verifier(self, pub_key_pem, **kwargs): m_public_key_ret = self._setup_mock_public_key_retriever(pub_key_pem) return atlassian_jwt_auth.JWTAuthVerifier(m_public_key_ret, **kwargs)
def static_verifier(keys): return atlassian_jwt_auth.JWTAuthVerifier( get_static_retriever_class(keys)())