From d26ee5441e762d8eed98f6800aafe52d9f91cdec Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Wed, 12 Oct 2016 22:43:17 +0200 Subject: [PATCH] fix authenticator config --- transport/internet/authenticator.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/transport/internet/authenticator.go b/transport/internet/authenticator.go index c7244117d..2c75ce95e 100644 --- a/transport/internet/authenticator.go +++ b/transport/internet/authenticator.go @@ -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) {