Skip to content

Commit

Permalink
start combining oidc and oauth2 logic [#523]
Browse files Browse the repository at this point in the history
  • Loading branch information
roberlander2 committed Aug 23, 2022
1 parent 7b8f6c8 commit 4b0f706
Show file tree
Hide file tree
Showing 5 changed files with 341 additions and 168 deletions.
10 changes: 5 additions & 5 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"filename": "core/auth/auth.go",
"hashed_secret": "4d55af37dbbb6a42088d917caa1ca25428ec42c9",
"is_verified": false,
"line_number": 2420
"line_number": 2429
}
],
"core/auth/auth_type_email.go": [
Expand Down Expand Up @@ -191,9 +191,9 @@
{
"type": "Secret Keyword",
"filename": "core/auth/auth_type_oauth2.go",
"hashed_secret": "15a46c63d80cdc62bb7e988a24b5839ecb624e25",
"hashed_secret": "f8dabcd142517fb16418a3a2790f3da31392537a",
"is_verified": false,
"line_number": 282
"line_number": 130
}
],
"core/auth/auth_type_oidc.go": [
Expand All @@ -202,7 +202,7 @@
"filename": "core/auth/auth_type_oidc.go",
"hashed_secret": "0ade4f3edccc8888bef404fe6b3c92c13cdfad6b",
"is_verified": false,
"line_number": 368
"line_number": 361
}
],
"driven/emailer/adapter.go": [
Expand Down Expand Up @@ -288,5 +288,5 @@
}
]
},
"generated_at": "2022-08-23T19:59:57Z"
"generated_at": "2022-08-23T22:08:15Z"
}
9 changes: 9 additions & 0 deletions core/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -2086,6 +2086,15 @@ func (a *Auth) queryValuesFromURL(urlStr string) (url.Values, error) {
return parsedCreds, nil
}

func (a *Auth) encodeQueryValues(values map[string]string) string {
data := url.Values{}
for k, v := range values {
data.Set(k, v)
}

return data.Encode()
}

func (a *Auth) getAuthTypeImpl(authType model.AuthType) (authType, error) {
if auth, ok := a.authTypes[authType.Code]; ok {
return auth, nil
Expand Down

0 comments on commit 4b0f706

Please sign in to comment.