Exemplo n.º 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);
        }
Exemplo n.º 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));
        }