public TokenGrantHistory(TokenGrantType type, uint256 transaction, TokenAmount amount) { if (amount <= TokenAmount.Zero) { throw new ArgumentOutOfRangeException(nameof(amount)); } this.Type = type; this.Transaction = transaction; this.Amount = amount; }
internal PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema(string service, string scope, string acrRefreshToken, TokenGrantType grantType = TokenGrantType.RefreshToken) { if (service == null) { throw new ArgumentNullException(nameof(service)); } if (scope == null) { throw new ArgumentNullException(nameof(scope)); } if (acrRefreshToken == null) { throw new ArgumentNullException(nameof(acrRefreshToken)); } Service = service; Scope = scope; AcrRefreshToken = acrRefreshToken; GrantType = grantType; }
public static string ToSerialString(this TokenGrantType value) => value switch {
public Task <Response <AcrAccessToken> > ExchangeAcrRefreshTokenForAcrAccessTokenAsync(string service, string scope, string acrRefreshToken, TokenGrantType grantType = TokenGrantType.RefreshToken, CancellationToken token = default) { return(Task.FromResult(Response.FromValue(_acrAccessTokenFunc(service, scope), new MockResponse(200)))); }