コード例 #1
0
ファイル: GitHubApi.cs プロジェクト: noark9/IronGitHub
        async public Task<Authorization> AuthorizeApplication(NetworkCredential credential, Application application, IEnumerable<Scopes> scopes, string note = null)
        {
            var authRequest = new Authorization.AuthorizeAppRequestPost
            {
                ClientId = application.ClientId,
                ClientSecret = application.ClientSecret,
                Scopes = scopes
            };
            if (note != null)
                authRequest.Note = note;

            return await Authorize(credential, authRequest);
        }
コード例 #2
0
ファイル: GitHubApi.cs プロジェクト: wyvernzora/IronGitHub
        async public Task <Authorization> AuthorizeApplication(NetworkCredential credential, Application application, IEnumerable <Scopes> scopes, string note = null)
        {
            var authRequest = new Authorization.AuthorizeAppRequestPost
            {
                ClientId     = application.ClientId,
                ClientSecret = application.ClientSecret,
                Scopes       = scopes
            };

            if (note != null)
            {
                authRequest.Note = note;
            }

            return(await Authorize(credential, authRequest));
        }