chore: replace interface{}
with any
(#448)
This PR replaces all occurances of interface{} with any to be consistent and improve readability. * example: Replace `interface{}` with `any` Signed-off-by: Thomas Hipp <thomashipp@gmail.com> * pkg/client: Replace `interface{}` with `any` Signed-off-by: Thomas Hipp <thomashipp@gmail.com> * pkg/crypto: Replace `interface{}` with `any` Signed-off-by: Thomas Hipp <thomashipp@gmail.com> * pkg/http: Replace `interface{}` with `any` Signed-off-by: Thomas Hipp <thomashipp@gmail.com> * pkg/oidc: Replace `interface{}` with `any` Signed-off-by: Thomas Hipp <thomashipp@gmail.com> * pkg/op: Replace `interface{}` with `any` Signed-off-by: Thomas Hipp <thomashipp@gmail.com> --------- Signed-off-by: Thomas Hipp <thomashipp@gmail.com>
This commit is contained in:
parent
ceaf2b184d
commit
e6e3835362
25 changed files with 83 additions and 83 deletions
|
@ -46,8 +46,8 @@ func GetKeyIDAndAlg(jws *jose.JSONWebSignature) (string, string) {
|
|||
//
|
||||
// will return false none or multiple match
|
||||
//
|
||||
//deprecated: use FindMatchingKey which will return an error (more specific) instead of just a bool
|
||||
//moved implementation already to FindMatchingKey
|
||||
// deprecated: use FindMatchingKey which will return an error (more specific) instead of just a bool
|
||||
// moved implementation already to FindMatchingKey
|
||||
func FindKey(keyID, use, expectedAlg string, keys ...jose.JSONWebKey) (jose.JSONWebKey, bool) {
|
||||
key, err := FindMatchingKey(keyID, use, expectedAlg, keys...)
|
||||
return key, err == nil
|
||||
|
@ -91,7 +91,7 @@ func FindMatchingKey(keyID, use, expectedAlg string, keys ...jose.JSONWebKey) (k
|
|||
return key, ErrKeyNone
|
||||
}
|
||||
|
||||
func algToKeyType(key interface{}, alg string) bool {
|
||||
func algToKeyType(key any, alg string) bool {
|
||||
switch alg[0] {
|
||||
case 'R', 'P':
|
||||
_, ok := key.(*rsa.PublicKey)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue