chore: remove unused context in NewOpenIDProvider
BREAKING CHANGE: - op.NewOpenIDProvider - op.NewDynamicOpenIDProvider The call chain of above functions did not use the context anywhere. This change removes the context from those fucntion arguments.
This commit is contained in:
parent
4dca29f1f9
commit
4bd2b742f9
6 changed files with 14 additions and 22 deletions
|
@ -54,7 +54,7 @@ func init() {
|
|||
)
|
||||
|
||||
var err error
|
||||
testProvider, err = op.NewOpenIDProvider(context.TODO(), testIssuer, config,
|
||||
testProvider, err = op.NewOpenIDProvider(testIssuer, config,
|
||||
storage.NewStorage(storage.NewUserStore(testIssuer)), op.WithAllowInsecure(),
|
||||
)
|
||||
if err != nil {
|
||||
|
|
10
pkg/op/op.go
10
pkg/op/op.go
|
@ -157,15 +157,15 @@ type endpoints struct {
|
|||
// Successful logins should mark the request as authorized and redirect back to to
|
||||
// op.AuthCallbackURL(provider) which is probably /callback. On the redirect back
|
||||
// to the AuthCallbackURL, the request id should be passed as the "id" parameter.
|
||||
func NewOpenIDProvider(ctx context.Context, issuer string, config *Config, storage Storage, opOpts ...Option) (*Provider, error) {
|
||||
return newProvider(ctx, config, storage, StaticIssuer(issuer), opOpts...)
|
||||
func NewOpenIDProvider(issuer string, config *Config, storage Storage, opOpts ...Option) (*Provider, error) {
|
||||
return newProvider(config, storage, StaticIssuer(issuer), opOpts...)
|
||||
}
|
||||
|
||||
func NewDynamicOpenIDProvider(ctx context.Context, path string, config *Config, storage Storage, opOpts ...Option) (*Provider, error) {
|
||||
return newProvider(ctx, config, storage, IssuerFromHost(path), opOpts...)
|
||||
func NewDynamicOpenIDProvider(path string, config *Config, storage Storage, opOpts ...Option) (*Provider, error) {
|
||||
return newProvider(config, storage, IssuerFromHost(path), opOpts...)
|
||||
}
|
||||
|
||||
func newProvider(ctx context.Context, config *Config, storage Storage, issuer func(bool) (IssuerFromRequest, error), opOpts ...Option) (_ *Provider, err error) {
|
||||
func newProvider(config *Config, storage Storage, issuer func(bool) (IssuerFromRequest, error), opOpts ...Option) (_ *Provider, err error) {
|
||||
o := &Provider{
|
||||
config: config,
|
||||
storage: storage,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue