Exemple #1
0
 public AuthResponse ValidateToken(string recoveryToken)
 {
     var apiObject = new ApiObject();
     apiObject.SetProperty("recoveryToken", recoveryToken);
     var response = BaseClient.Post(resourcePath + Constants.RecoveryEndpoint + Constants.TokenEndpoint, apiObject.ToJson());
     return Utils.Deserialize<AuthResponse>(response);
 }
Exemple #2
0
 public AuthResponse GetStatus(string stateToken)
 {
     var apiObject = new ApiObject();
     apiObject.SetProperty("stateToken", stateToken);
     var response = BaseClient.Post(resourcePath, apiObject.ToJson());
     return Utils.Deserialize<AuthResponse>(response);
 }
Exemple #3
0
 public AuthResponse ActivateTotpFactor(string stateToken, AuthResponse authResponse, string passCode)
 {
     var apiObject = new ApiObject();
     apiObject.SetProperty("passCode", passCode);
     var nextLink = authResponse.Links["next"].First();
     return Execute(stateToken, nextLink, apiObject);
 }
Exemple #4
0
 public AuthResponse Execute(string stateToken, Uri uri, ApiObject apiObject = null)
 {
     // Create a new apiObject if it's null, because we need to add a stateToken
     apiObject = apiObject ?? new ApiObject();
     apiObject.SetProperty("stateToken", stateToken);
     var response = BaseClient.Post(uri, apiObject.ToJson());
     return Utils.Deserialize<AuthResponse>(response);
 }
Exemple #5
0
 public AuthResponse Execute(string stateToken, Link link, ApiObject apiObject = null)
 {
     return Execute(stateToken, link.Href, apiObject);
 }