diff --git a/VisualStudioTeamServices.Authentication/Test/AuthorityFake.cs b/VisualStudioTeamServices.Authentication/Test/AuthorityFake.cs index db56c91..1d3627a 100644 --- a/VisualStudioTeamServices.Authentication/Test/AuthorityFake.cs +++ b/VisualStudioTeamServices.Authentication/Test/AuthorityFake.cs @@ -62,6 +62,18 @@ namespace VisualStudioTeamServices.Authentication.Test return await Task.FromResult(new Token("personal-access-token", TokenType.Personal)); } + /// + /// Generates a personal access token for use with Visual Studio Team Services. + /// + /// Returns the acquired token if successful; otherwise ; + /// + /// The uniform resource indicator of the resource access tokens are being requested for. + /// Access token granted by the identity authority (Azure). + /// The requested access scopes to be granted to the token. + /// `` if requesting a compact format token; otherwise ``. + public Task GeneratePersonalAccessToken(TargetUri targetUri, Token accessToken, TokenScope tokenScope, bool requireCompactToken) + => GeneratePersonalAccessToken(targetUri, accessToken, tokenScope, requireCompactToken, null); + /// /// Acquires a from the authority via an interactive user logon prompt. /// @@ -72,7 +84,7 @@ namespace VisualStudioTeamServices.Authentication.Test /// Identifier of the target resource that is the recipient of the requested token. /// Address to return to upon receiving a response from the authority. /// optional value, appended as-is to the query string in the HTTP authentication request to the authority. - public async Task InteractiveAcquireToken(TargetUri targetUri, string clientId, string resource, Uri redirectUri, string queryParameters = null) + public async Task InteractiveAcquireToken(TargetUri targetUri, string clientId, string resource, Uri redirectUri, string queryParameters) { Assert.Equal(ExpectedQueryParameters, queryParameters); diff --git a/analysisRules.ruleset b/analysisRules.ruleset index f62a433..b3e215e 100644 --- a/analysisRules.ruleset +++ b/analysisRules.ruleset @@ -32,6 +32,7 @@ +