Esempio n. 1
0
 private void createClient()
 {
     this.seedClient      = Client.Create(ApplicationUser);
     this.seedClient.name = "Sowatech.TestAnwendung" + ".Client";
     context.Clients.Add(this.seedClient);
     context.SaveChanges();
 }
Esempio n. 2
0
 public UpdateClientDto(Dom.Client src = null)
 {
     if (src != null)
     {
         this.id          = src.id;
         this.name        = src.name;
         this.accessStart = ShortDateConverter.ConvertToIso(src.accessStart);
         this.accessEnd   = ShortDateConverter.ConvertToIso(src.accessEnd);
     }
 }
        private TLoginSuccess ClientTryLoginAccess(ApplicationUser user, OAuthGrantResourceOwnerCredentialsContext oauthContext, EntityFrameworkContext efContext)
        {
            TLoginSuccess success = TLoginSuccess.Success;

            if (user.client_id.HasValue)
            {
                Dom.Client client = efContext.Clients.Find(user.client_id.Value);
                success = TryLoginAccess("client", client.accessStart, client.accessEnd, oauthContext);
            }
            return(success);
        }
Esempio n. 4
0
        private void from(Dom.Client client)
        {
            id          = client.id;
            name        = client.name;
            accessEnd   = ShortDateConverter.ConvertToIso(client.accessEnd);
            accessStart = ShortDateConverter.ConvertToIso(client.accessStart);

            created   = client.created;
            createdBy = client.createdBy;
            edited    = client.edited;
            editedBy  = client.editedBy;
        }
Esempio n. 5
0
 public ClientDto(Dom.Client client)
 {
     this.from(client);
 }