Ejemplo n.º 1
0
 public CredentialsForm(MusicService service)
 {
     InitializeComponent();
     svc = service;
     usernamePasswordService = service.AsUsernamePasswordAuthenticatable();
     FillInInfo();
 }
 public async Task <AuthenticationResult> Authenticate(MusicService service, string username, string password, bool rememberMe)
 {
     ServiceBeginAuthenticating(service);
     try
     {
         return
             (new AuthenticationResult(service, await service.AsUsernamePasswordAuthenticatable().AuthenticateAsync(username, password, rememberMe)));
     }
     finally
     {
         ServiceEndAuthenticating(service);
     }
 }