mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-09-29 19:21:13 +02:00
Update golangci-lint version in CI workflow
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user