예제 #1
0
        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
        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));
        }