Ejemplo n.º 1
0
 /// <summary>
 /// Получить пользователя о умолчанию
 /// </summary>
 private static BoutiqueUser GetDefaultUser(IAuthorizeDomain authorizeDomain, string email, string phone) =>
 new BoutiqueUser(IdentityRoleTypes.ADMIN_ROLE, authorizeDomain, email, phone);
Ejemplo n.º 2
0
 public BoutiqueUser(string identityRoleType, IAuthorizeDomain authorizeDomain, string email, string phone)
     : this(identityRoleType, authorizeDomain.UserName, authorizeDomain.Password, email, phone)
 {
 }
 /// <summary>
 /// Авторизироваться с помощью токена
 /// </summary>
 private static async Task <IResultValue <string> > Authorize(IRestHttpClient restClient, IAuthorizeDomain authorizeDomain,
                                                              IBoutiqueLogger boutiqueLogger) =>
 await BoutiqueRestServiceFactory.GetAuthorizeRestService(restClient).ToResultValue().
 ResultValueBindOkAsync(service => service.AuthorizeJwt(authorizeDomain).
                        VoidTaskAsync(token => LogAuthorize(token, service, boutiqueLogger)));