Skip to content

Commit

Permalink
Merge pull request #22 from mbrg/cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
mbrg authored Jul 30, 2023
2 parents 375a673 + 18ef94d commit e169cab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 37 deletions.
36 changes: 0 additions & 36 deletions src/powerpwn/powerdoor/readme.md

This file was deleted.

8 changes: 7 additions & 1 deletion src/powerpwn/powerdump/utils/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ def acquire_token(scope: str, tenant: Optional[str] = None) -> str:
)
)

bearer = azure_cli_bearer_tokens_for_scope.get("token_type") + " " + azure_cli_bearer_tokens_for_scope.get("access_token")
if "token_type" not in azure_cli_bearer_tokens_for_scope or "access_token" not in azure_cli_bearer_tokens_for_scope:
logger.debug(
f"Acquired a token package with scope={scope}, tenant={tenant}. Received the following keys: {list(azure_cli_bearer_tokens_for_scope.key())}."
)
raise RuntimeError(f"Something went wrong when trying to fetch tokens with scope={scope}, tenant={tenant}. Try removing cached credentials.")

bearer = azure_cli_bearer_tokens_for_scope["token_type"] + " " + azure_cli_bearer_tokens_for_scope["access_token"]
logger.info(f"Access token for {scope} acquired successfully")

# cache refresh token for cli to use in further FOCI authentication
Expand Down

0 comments on commit e169cab

Please sign in to comment.