/// <summary> /// Initializes a new <c>VssOAuthCredential</c> instance with the specified authorization grant and client /// credentials. /// </summary> /// <param name="authorizationUrl">The location of the token endpoint for the target authorization server</param> /// <param name="grant">The grant to provide for the token exchange</param> /// <param name="clientCredential">The client credentials to provide for the token exchange</param> /// <param name="tokenParameters">An optional set of token parameters which, if present, are sent in the request body of the token request</param> /// <param name="accessToken">An optional access token which, if present, is used prior to requesting new tokens</param> public VssOAuthCredential( Uri authorizationUrl, VssOAuthGrant grant, VssOAuthClientCredential clientCredential, VssOAuthTokenParameters tokenParameters = null, VssOAuthAccessToken accessToken = null) : base(accessToken) { ArgumentUtility.CheckForNull(authorizationUrl, nameof(authorizationUrl)); ArgumentUtility.CheckForNull(grant, nameof(grant)); m_authorizationUrl = authorizationUrl; m_grant = grant; m_tokenParameters = tokenParameters; m_clientCredential = clientCredential; }
/// <summary> /// Initializes a new <c>VssOAuthAccessTokenCredential</c> instance with the specified access token. /// </summary> /// <param name="accessToken">The access token</param> public VssOAuthAccessTokenCredential(VssOAuthAccessToken accessToken) : base(accessToken) { }