mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-09-23 07:03:20 +00:00
fix authenticator config
This commit is contained in:
parent
fc6a706166
commit
d26ee5441e
@ -22,7 +22,14 @@ type AuthenticatorFactory interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *AuthenticatorConfig) GetInternalConfig() (interface{}, error) {
|
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) {
|
func NewAuthenticatorConfig(name string, config interface{}) (*AuthenticatorConfig, error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user