Example #1
0
        public override async Task <BToken> GetToken(SignUpSender signUpSender)
        {
            ConfigHttpLite config = await Context.GetConfiguration <ConfigHttpLite>(Provider.ServiceName, signUpSender.UserId);

            if (config != null && !String.IsNullOrEmpty(config.Token))
            {
                return(config);
            }
            return(null);
        }
Example #2
0
        public override async Task <ResponseBase> SetObservableToken(SignUpSender signUpSender, BToken token)
        {
            var config = await Context.GetConfiguration <ConfigHttpLite>(this.Provider.ServiceName, signUpSender.UserId);

            if (config == null)
            {
                config = new ConfigHttpLite {
                    Token = token.Token, UserId = signUpSender.UserId
                };
            }
            else
            {
                config.Token = token.Token;
            }
            var result = await this.Context.SetConfiguration(this.Provider.ServiceName, signUpSender.UserId, config);

            return(result);
        }