Merge lp:~vds/usso/validity_check_and_better_auth_failure_handling into lp:usso
Proposed by
Vincenzo Di Somma
Status: | Merged |
---|---|
Approved by: | Vincenzo Di Somma |
Approved revision: | 43 |
Merged at revision: | 43 |
Proposed branch: | lp:~vds/usso/validity_check_and_better_auth_failure_handling |
Merge into: | lp:usso |
Diff against target: |
232 lines (+78/-70) 2 files modified
usso.go (+47/-51) usso_test.go (+31/-19) |
To merge this branch: | bzr merge lp:~vds/usso/validity_check_and_better_auth_failure_handling |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Casey Marshall (community) | Approve | ||
Andrew W. Deane (community) | Approve | ||
Review via email: mp+208609@code.launchpad.net |
Commit message
Improve error handling. Add explicit token validity check.
Description of the change
Improve error handling. Add explicit token validity check.
To post a comment you must log in.
Instead of declaring jsonBuffer as an interface at 64+ and then casting to a map at 70+ could jsonBuffer just be declared as a map leaving json.Unmarshal to do the work?
At 75+ if USSO change there source and the json code field is no longer a string then we will panic. If 75+ was replaced with the code below we won't panic should the external source change.
return "", fmt.Errorf( "%v",code)
Do you think it is worth changing the code to be on the safe side?
The above questions for 124+, 137+, and 142+ too.