Update golangci-lint version in CI workflow

This commit is contained in:
Joel Speed
2021-02-17 20:25:37 +00:00
parent 76269a13b7
commit 9cea4ea89b
7 changed files with 23 additions and 13 deletions
+9 -2
View File
@@ -3,9 +3,10 @@ package providers
import (
"bytes"
"context"
"crypto/rand"
"crypto/rsa"
"fmt"
"math/rand"
"math/big"
"net/url"
"time"
@@ -34,7 +35,13 @@ var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
func randSeq(n int) string {
b := make([]rune, n)
for i := range b {
b[i] = letters[rand.Intn(len(letters))]
max := big.NewInt(int64(len(letters)))
bigN, err := rand.Int(rand.Reader, max)
if err != nil {
// This should never happen
panic(err)
}
b[i] = letters[bigN.Int64()]
}
return string(b)
}
+1 -1
View File
@@ -94,7 +94,7 @@ func (p *ProviderData) GetLoginURL(redirectURI, state string) string {
}
// GetEmailAddress returns the Account email address
// DEPRECATED: Migrate to EnrichSession
// Deprecated: Migrate to EnrichSession
func (p *ProviderData) GetEmailAddress(_ context.Context, _ *sessions.SessionState) (string, error) {
return "", ErrNotImplemented
}
+1 -1
View File
@@ -9,7 +9,7 @@ import (
// Provider represents an upstream identity provider implementation
type Provider interface {
Data() *ProviderData
// DEPRECATED: Migrate to EnrichSession
// Deprecated: Migrate to EnrichSession
GetEmailAddress(ctx context.Context, s *sessions.SessionState) (string, error)
Redeem(ctx context.Context, redirectURI, code string) (*sessions.SessionState, error)
EnrichSession(ctx context.Context, s *sessions.SessionState) error