fix authenticator config

pull/314/head
Darien Raymond 2016-10-12 22:43:17 +02:00
parent fc6a706166
commit d26ee5441e
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 8 additions and 1 deletions

View File

@ -22,7 +22,14 @@ type AuthenticatorFactory interface {
}
func (this *AuthenticatorConfig) GetInternalConfig() (interface{}, error) {
return configCache.CreateConfig(this.Name)
config, err := configCache.CreateConfig(this.Name)
if err != nil {
return nil, err
}
if err := ptypes.UnmarshalAny(this.Settings, config.(proto.Message)); err != nil {
return nil, err
}
return config, nil
}
func NewAuthenticatorConfig(name string, config interface{}) (*AuthenticatorConfig, error) {