-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor invalid session duration handling
- Loading branch information
Showing
3 changed files
with
47 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a5c9164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@allcloud-jonathan You mean
aws sts ...
in the warning message we are printing? No, we can add it. This commit isn't the final state, I was concentrating on the error handling logic and on moving the pieces of code to the right place. It can definitely be useful to print a command and/or a link to the docs.What do you mean? Are you talking about the code duplication between the packages
onelogin
andokta
? If so, this is a separate issue outside the scope of this PR, i.e. making the provider part of Clisso generic using Go interfaces so that the calling code doesn't care about the provider type. We actually have an open issue for this.I moved the "fallback to 1h" handling into the provider packages since it makes more sense to have it there. This makes the error handling in the
aws
package simple and generic and lets the caller decide if and how they want to retry stuff. It could even make more sense to move this logic to the cmd package but this would require a large-scale refactoring which I'd like to avoid. In any case this is out of scope for this PR.a5c9164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this logic makes sense to you I can add this commit to the PR. We should review the docs and comments again to make sure they match the latest code and then we should be able to merge.
a5c9164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, I'll do my best to complete this tonight (currently at work...). I'll comment on the PR when done.