protected IntegrationTest() { var environment = System.Environment.GetEnvironmentVariables(); sut = new TrusonaSDK.API.Trusona( token: (string)environment["TRUSONA_TOKEN"], secret: (string)environment["TRUSONA_SECRET"], environment: TrusonaEnvironment.UAT ); buster = new Buster(); }
public static async Task <List <IntegrationAccount> > GetIntegrationAccounts(this Trusona trusona, Guid integrationId, string[] identifiers) { try { var response = await trusona.IntegrationAccountService.GetIntegrationAccountsAsync(integrationId, identifiers); return(trusona.mapper.Map <List <IntegrationAccount> >(response)); } catch (TrusonaServiceException ex) { HandleServiceException(ex, DefaultErrorHandler); throw ex; } }
public static async Task <IntegrationAccount> CreateIntegrationAccount(this Trusona trusona, Guid integrationId, IntegrationAccount integrationAccount) { try { var request = trusona.mapper.Map <IntegrationAccountRequest>(integrationAccount); var response = await trusona.IntegrationAccountService.CreateIntegrationAccountAsync(integrationId, request); return(trusona.mapper.Map <IntegrationAccount>(response)); } catch (TrusonaServiceException ex) { HandleServiceException(ex, DefaultErrorHandler); throw ex; } }
public static async Task <IntegrationCredentialResponse> CreateIntegrationCredential(this Trusona trusona, Guid integrationId, string identifier) { try { var response = await trusona.IntegrationCredentialService.CreateIntegrationCredentialAsync(integrationId, identifier); return(trusona.mapper.Map <IntegrationCredentialResponse>(response)); } catch (TrusonaServiceException ex) { HandleServiceException(ex, DefaultErrorHandler); throw ex; } }
public static async Task <List <IntegrationAccount> > GetIntegrationAccounts(this Trusona trusona, Guid integrationId, string identifier) { return(await GetIntegrationAccounts(trusona, integrationId, new string[] { identifier })); }