Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V2] Add the OAuth Authorization Code Flow with PKCE #8947

Open
wants to merge 11 commits into
base: v2
Choose a base branch
from
Open
5 changes: 5 additions & 0 deletions .changes/next-release/feature-sso-81096.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "feature",
"category": "``sso``",
"description": "Add support and default to the OAuth 2.0 Authorization Code Flow with PKCE for ``aws sso login``."
}
14 changes: 13 additions & 1 deletion awscli/botocore/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,14 +674,18 @@ class SSOError(BotoCoreError):
class PendingAuthorizationExpiredError(SSOError):
fmt = (
"The pending authorization to retrieve an SSO token has expired. The "
"device authorization flow to retrieve an SSO token must be restarted."
"login flow to retrieve an SSO token must be restarted."
)


class SSOTokenLoadError(SSOError):
fmt = "Error loading SSO Token: {error_msg}"


class AuthorizationCodeLoadError(SSOError):
fmt = "Error loading authorization code: {error_msg}"


class UnauthorizedSSOTokenError(SSOError):
fmt = (
"The SSO session associated with this profile has expired or is "
Expand All @@ -690,6 +694,14 @@ class UnauthorizedSSOTokenError(SSOError):
)


class AuthCodeFetcherError(SSOError):
fmt = (
"Unable to initialize the OAuth 2.0 authorization callback handler: "
"{error_msg} \n You may use --use-device-code to fall back to the "
"device code flow which does not require the callback handler."
)


class CapacityNotAvailableError(BotoCoreError):
fmt = (
'Insufficient request capacity available.'
Expand Down
Loading
Loading