Esempio n. 1
0
        public HttpResponseMessage Get()
        {
            var response = Request.CreateResponse(HttpStatusCode.Found);

            response.Headers.Location = SpotifyAuthorizer.GetAuthorizationUrl(_clientId, _redirect, _requiredScopes);
            return(response);
        }
Esempio n. 2
0
        public Service(Func <string, SpotifyAuthorizedClient> clientFactory, SpotifyAuthorizer authorizer)
        {
            _clientFactory = clientFactory;
            _authorizer    = authorizer;
            _clientId      = ConfigurationManager.AppSettings["ClientId"];
            _clientSecret  = ConfigurationManager.AppSettings["ClientSecret"];
            _redirect      = ConfigurationManager.AppSettings["Redirect"];

            _start = new ManualResetEvent(false);
        }
Esempio n. 3
0
        public Service(Func<string, SpotifyAuthorizedClient> clientFactory, SpotifyAuthorizer authorizer)
        {
            _clientFactory = clientFactory;
            _authorizer = authorizer;
            _clientId = ConfigurationManager.AppSettings["ClientId"];
            _clientSecret = ConfigurationManager.AppSettings["ClientSecret"];
            _redirect = ConfigurationManager.AppSettings["Redirect"];

            _start = new ManualResetEvent(false);
        }