vksdk icon indicating copy to clipboard operation
vksdk copied to clipboard

Интерфейс для авторизации

Open tdakkota opened this issue 6 years ago • 0 comments

#78 #70

для пула можно использовать такую реализацию

func TokenPoolAuthenticator(tokens ...string) Authenticator {
        tokenPool := internal.NewTokenPool(tokens...)
	return AuthenticatorFunc(func(params Params) error {
		if _, ok := params["access_token"]; !ok {
			params["access_token"] = tokenPool.Get()
		}

		return nil
	})
}

tdakkota avatar Feb 27 '20 13:02 tdakkota