public OrganizationApiRequest(ICredentials credentials, IEndpoint endpoint, ITimeProvider time) { m_credentials = credentials; m_endpoint = endpoint; m_time = time; m_macHash = new HMACSHA512(Convert.FromBase64String(credentials.Secret())); m_contentHash = new MD5CryptoServiceProvider(); }
public RequestAuthorization(ICredentials credentials, IScopes requestedScopes) : base( "api/v1/auth/token", HttpMethod.Post, "grant_type=client_credentials" + $"&client_id={credentials.Identifier()}" + $"&client_secret={credentials.Secret()}" + $"&scope={string.Join(" ", requestedScopes.Required())}") { }