Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public static string ToSerialString(this TokenGrantType value) => value switch
 {
Exemplo n.º 4
0
 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))));
 }