Beispiel #1
0
        public AuthenticationResult VerifyAuthentication(HttpContextBase context)
        {
            var accessToken = GetAccessToken(context);
            var userData    = GetUserData(accessToken);

            return(OAuthHelpers.CreateAuthenticationResult(ProviderName, userData));
        }
        public AuthenticationResult VerifyAuthentication(HttpContextBase context)
        {
            var url      = CreateUserInfoUrl(context);
            var request  = OAuthHelpers.Load(url);
            var userData = CreateUserInfo(request);

            return(OAuthHelpers.CreateAuthenticationResult(ProviderName, userData));
        }
Beispiel #3
0
        public AuthenticationResult VerifyAuthentication(HttpContextBase context)
        {
            var authorizationCode = context.Request["code"];
            var accessToken       = GetAccessToken(authorizationCode, context.Request.Url);
            var userData          = GetUserData(accessToken);

            return(OAuthHelpers.CreateAuthenticationResult(ProviderName, userData));
        }
Beispiel #4
0
        public AuthenticationResult VerifyAuthentication(HttpContextBase context)
        {
            var url      = CreateAccessTokenUrl(context);
            var response = OAuthHelpers.Load(url);

            RegenerateSignatureKey(response);
            var userInfo = GetUserData(OAuthHelpers.GetValueFromRequest(response, "oauth_token"));

            return(OAuthHelpers.CreateAuthenticationResult(ProviderName, userInfo));
        }
Beispiel #5
0
        public AuthenticationResult VerifyAuthentication(HttpContextBase context)
        {
            var url             = CreateUserInfoUrl(context);
            var response        = OAuthHelpers.Load(url);
            var queryCollection = HttpUtility.ParseQueryString(response);

            var userInfo = new UserInfo {
                Id       = queryCollection.Get("user_id"),
                UserName = queryCollection.Get("screen_name")
            };

            return(OAuthHelpers.CreateAuthenticationResult(ProviderName, userInfo));
        }
        public AuthenticationResult VerifyAuthentication(HttpContextBase context)
        {
            var accessInfo = GetAccessInfo(context.Request["code"]);

            return(OAuthHelpers.CreateAuthenticationResult(ProviderName, accessInfo));
        }