def METHOD_NAME(self):
    """test successful (password grant)"""
    response = self.client.post(
        reverse("authentik_providers_oauth2:token"),
        {
            "grant_type": GRANT_TYPE_PASSWORD,
            "scope": f"{SCOPE_OPENID} {SCOPE_OPENID_EMAIL} {SCOPE_OPENID_PROFILE}",
            "client_id": self.provider.client_id,
            "username": "sa",
            "password": self.token.key,
        },
    )
    self.assertEqual(response.status_code, 200)
    body = loads(response.content.decode())
    self.assertEqual(body["token_type"], TOKEN_TYPE)
    _, alg = self.provider.jwt_key
    jwt = decode(
        body["access_token"],
        key=self.provider.signing_key.public_key,
        algorithms=[alg],
        audience=self.provider.client_id,
    )
    self.assertEqual(jwt["given_name"], self.user.name)
    self.assertEqual(jwt["preferred_username"], self.user.username)