support oidc identity provider
Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
@@ -145,7 +145,7 @@ type IdentityProviderOptions struct {
|
||||
Type string `json:"type" yaml:"type"`
|
||||
|
||||
// The options of identify provider
|
||||
Provider *DynamicOptions `json:"provider" yaml:"provider"`
|
||||
Provider DynamicOptions `json:"provider" yaml:"provider"`
|
||||
}
|
||||
|
||||
type Token struct {
|
||||
@@ -231,6 +231,7 @@ func (o *Options) OAuthClient(name string) (Client, error) {
|
||||
}
|
||||
return Client{}, ErrorClientNotFound
|
||||
}
|
||||
|
||||
func (o *Options) IdentityProviderOptions(name string) (*IdentityProviderOptions, error) {
|
||||
for _, found := range o.IdentityProviders {
|
||||
if found.Name == name {
|
||||
|
||||
@@ -49,7 +49,6 @@ func TestDefaultAuthOptions(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestClientResolveRedirectURL(t *testing.T) {
|
||||
|
||||
options := NewOptions()
|
||||
defaultClient, err := options.OAuthClient("default")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user