Example #1
0
        public UserInfoResponse GetUserInfo(string accessToken)
        {
            urlBase = string.Format("{0}{1}", (ServiceLocator.Instance.Get <BaseSeusSettings>() ?? new SeusLabSettings()).BaseSeusURL, accountRootEndpoint);
            fullUrl = string.Format("{0}{1}", urlBase, userInfoEndpoint);

            var headers = new Dictionary <string, string>
            {
                { "Accept", ContentTypeJson }
            };

            var repositoryBase = new RestConsumerJson <object, UserInfoResponse>(httpClientHandler, storage);

            return(repositoryBase.ConsumeRestService(null, fullUrl, HttpMethod.Get, headers));
        }
Example #2
0
        public AuthorizeResponse Authorize(string codeChallenge)
        {
            urlBase = string.Format("{0}{1}", (ServiceLocator.Instance.Get <BaseSeusSettings>() ?? new SeusLabSettings()).BaseSeusURL, accountRootEndpoint);
            string url = string.Format(AuthorizeEndPoint, (ServiceLocator.Instance.Get <BaseSeusSettings>() ?? new SeusLabSettings()).SeusClientId, codeChallenge, State, UrlRedirect, ResponseType);

            fullUrl = string.Format("{0}{1}", urlBase, url);

            var headers = new Dictionary <string, string>
            {
                { "Accept", ContentTypeJson }
            };

            var repositoryBase = new RestConsumerJson <object, AuthorizeResponse>(httpClientHandler, storage);

            return(repositoryBase.ConsumeRestService(null, fullUrl, HttpMethod.Get, headers));
        }