-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix references after renames; update to a new conduit API
- Loading branch information
1 parent
3a0b5be
commit 950cf71
Showing
9 changed files
with
67 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,9 @@ import ( | |
"golang.org/x/oauth2" | ||
) | ||
|
||
var _ sso.Provider[any] = (*provider[any])(nil) | ||
var _ shieldsso.Provider[any] = (*provider[any])(nil) | ||
|
||
var ( | ||
Issuer = "https://accounts.google.com" | ||
) | ||
var Issuer = "https://accounts.google.com" | ||
|
||
var ( | ||
AuthorizePath = "/sso/google" | ||
|
@@ -34,7 +32,7 @@ type provider[T any] struct { | |
} | ||
|
||
// NewProvider creates a new OpenID OAuth2 provider. | ||
func NewProvider[T any](ctx context.Context, cfg *Config) (sso.Provider[T], error) { | ||
func NewProvider[T any](ctx context.Context, cfg *Config) (shieldsso.Provider[T], error) { | ||
oidcProvider, err := oidc.NewProvider(ctx, Issuer) | ||
if err != nil { | ||
return nil, err | ||
|
@@ -54,7 +52,7 @@ func NewProvider[T any](ctx context.Context, cfg *Config) (sso.Provider[T], erro | |
}, nil | ||
} | ||
|
||
func (p *provider[T]) UserInfo(ctx context.Context, token *oauth2.Token) (sso.UserInfo[T], error) { | ||
func (p *provider[T]) UserInfo(ctx context.Context, token *oauth2.Token) (shieldsso.UserInfo[T], error) { | ||
// TODO([email protected]): use userInfo. | ||
_, err := p.provider.UserInfo(ctx, p.config.TokenSource(ctx, token)) | ||
if err != nil { | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package token | ||
package shieldtoken | ||
|
||
import ( | ||
"errors" | ||
|