Search Results

Search found 121 results on 5 pages for 'signin'.

Page 2/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • not enough actual parameters ?

    - by omair iqbal
    The following program returns error : e2035 not enough actual parameters in 2 places (lines 39 and 45) and is not compiling. Can someone please help me out? Can I put 0 or null in place of parameters here? unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs,ComObj,shdocvw,activex, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var mybrowser : iwebbrowser2; myUserName, myPassword,loginURL : string; Flags: OleVariant; begin Flags := navOpenInNewWindow; MyBrowser := CreateOleObject('InternetExplorer.Application') as IWebBrowser2; MyBrowser.Navigate('http://www.gmail.com',flags,'_blank'); myUserName := 'UserName'; myPassword := 'password'; loginURL:='javascript:var Email = document.getElementById(''Email'');Email.value=''' + myUserName + ''';var Password = document.getElementById(''Passwd'');Password.value=''' + myPassword + ''';var SignIn = document.getElementById(''signIn'');SignIn.click();'; MyBrowser.Navigate(loginURL); end; end.

    Read the article

  • Zend: How to authenticate using OpenId on local server.

    - by NAVEED
    I am using zend framework. Now I want to authenticate users with other already registered accounts using RPX. I am following the 3 steps as described at RPX site: 1- Get the Widget 2- Receive Tokens 3- Choose Providers I created a controller(person) and action(signin) to show widget and my own signin form. When following action (http://test.dev/#person/personsignin) is called then my own login form and widget is shown successfully. # is used in above URL for AJAX indication. public function personsigninAction() { $this->view->jsonEncoded = true; // Person Signin Form $PersonSigninForm = new Form_PersonSignin(); $this->view->PersonSigninForm = $PersonSigninForm; $this->view->PersonSigninForm->setAction( $this->view->url() ); $request = $this->getRequest(); if ( $request->isPost() ) { } } There are two problems while login using openid widget: When I am authenticated from outside(for example: Yahoo) then I am redirected to http://test.dev, therefor indexAction in called in indexController and home page is shown. I want to redirect to http://test.dev/#person/personsignin after authentication and want to set session in isPost() condition of personsigninAction() (described above). For now I consider indexAction to be called when outside authentication is done. Now I posted the code from http://gist.github.com/291396 in indexAction to follow step 3 mentioned above. But it is giving me following error: An error occured: Invalid parameter: apiKey Am I using the right way to use this. This is my very first attempt to this stuff. Can someone tell me the exact steps using my above actions? Thanks.

    Read the article

  • Response.Redirect in a COM+ Object Called from Classic ASP Page

    - by ajdams
    Basically we moved from IIS 5 to IIS 7 and I am trying to update some of our old COM objects to .NET by rewriting them in C#. What I am have so far is a Classic ASP page calling the COM+ object and then I am trying to do a simple redirect within the COM+ object (this is just for testing purposes, it's not what the object will do eventually). My problem/question is, why does the redirect call not work properly? Am I doing something wrong or can you not redirect within a COM+ object? All that happens is a blank white page comes up and if I check the IIS logs, I see no errors. Here is my code so far: In Classic ASP (the call to COM+) Set oBankReg = CreateObject("BVSRegistration.SignIn") oBankReg.GetBankId(bankid) Code in C# COM object: using System; using System.Web; using System.Text; using System.EnterpriseServices; using System.Collections.Generic; using System.Runtime.InteropServices; [assembly: ApplicationName("BVSRegistration")] [assembly: Description("COM+ upgrade of the BVSRegistration VB6 SignIn.cls.")] [assembly: ApplicationActivation(ActivationOption.Server)] [assembly: ApplicationAccessControl(false, AccessChecksLevel = AccessChecksLevelOption.ApplicationComponent)] namespace BVSRegistration { public class SignIn : ServicedComponent { public void GetBankId(string bankid) { HttpContext.Current.Response.Redirect("http://www.google.com"); } } } Any ideas? Thanks

    Read the article

  • Creating a framework for ASP.NET web forms similar to Flex states.

    - by Shawn Simon
    I really enjoy the flex states framework. You define a few states for your control, and then can set child controls to only appear in certain states. Check out this code: <s:states> <s:State name="signin"/> <s:State name="register"/> </s:states> <mx:FormItem label="Last name:" includeIn="register" id="lastNameItem" alpha="0.0"> <s:TextInput id="lastName" width="220"/> </mx:FormItem> Now the last name form will only appear in the register screen. This would be really useful I think in .NET where you use the page for views like update / insert. I was considering extending the Page element to have a states property using extension methods, and adding the include in to controls. This way I could auto-hide controls based on the current view at render time. What is even cooler in Flex, is that you can use different handlers / properties based on the current state. <s:Button label="Sign in" label.register="Register" id="loginButton" enabled="true" click.signin="signin()" click.register="register()"/> I'm sure there's a way I could implement something similar to this as well. Do you think this is a good idea? Or does it just add a level of abstraction to framework that already has a poor separation of concerns?

    Read the article

  • Symfony: joining two forms in the same page

    - by user248959
    Hi, i'm trying to join in the same action the login and the register forms. This is what i'm trying: modules/miembros/actions.class.php public function executeAux(sfWebRequest $request) { // I execute this action } modules/miembros/templates/auxSuccess.php <?php include_component('sfGuardRegister', 'register'); ?> <?php include_component('sfGuardAuth', 'signin'); ?> modules/miembros/components.class.php public function executeSignin($request) { if ( $request->isMethod( 'post' ) && ($request- >getParameter('submit')=='signin') ){ $this->form->bind( $request->getParameter( 'login' ) ); if ( $this->form->isValid() ){ $this->getController()->getActionStack()->getLastEntry()->getActionInstance()->redirect( '@home' ); } } } modules/miembros/templates/_signin.php <form action="<?php echo url_for('miembros/aux?submit=signin') ?>" method="post"> <?php echo $form['email_address']->renderLabel() ?> <?php echo $form['email_address'] ?> ... It's working ok, but i would to know if you have other alternatives. Regards Javi

    Read the article

  • Axis2 SOAP Envelope Header Information

    - by BigZig
    I'm consuming a web service that places an authentication token in the SOAP envelope header. It appears (through looking at the samples that came with the WS WSDL) that if the stub is generated in .NET, this header information is exposed through a member variable in the stub class. However, when I generate my Axis2 java stub using WSDL2Java it doesn't appear to be exposed anywhere. What is the correct way to extract this information from the SOAP envelope header? WSDL: http://www.vbar.com/zangelo/SecurityService.wsdl C# Sample: using System; using SignInSample.Security; // web service using SignInSample.Document; // web service namespace SignInSample { class SignInSampleClass { [STAThread] static void Main(string[] args) { // login to the Vault and set up the document service SecurityService secSvc = new SecurityService(); secSvc.Url = "http://localhost/AutodeskDM/Services/SecurityService.asmx"; secSvc.SecurityHeaderValue = new SignInSample.Security.SecurityHeader(); secSvc.SignIn("Administrator", "", "Vault"); DocumentServiceWse docSvc = new DocumentServiceWse(); docSvc.Url = "http://localhost/AutodeskDM/Services/DocumentService.asmx"; docSvc.SecurityHeaderValue = new SignInSample.Document.SecurityHeader(); docSvc.SecurityHeaderValue.Ticket = secSvc.SecurityHeaderValue.Ticket; docSvc.SecurityHeaderValue.UserId = secSvc.SecurityHeaderValue.UserId; } } } The sample illustrates what I'd like to do. Notice how the secSvc instance has a SecurityHeaderValue member variable that is populated after a successful secSvc.SignIn() invocation. Here's some relevant API documentation regarding the SignIn method: Although there is no return value, a successful sign in will populate the SecurityHeaderValue of the security service. The SecurityHeaderValue information is then used for other web service calls.

    Read the article

  • Update to Easy Slider 1.7 made all my JQuery code stop working.

    - by Anders H
    I'm pretty novice as a JQuery user goes. I've got some experience implementing different plugins but would be lost trying to customize my own. I can't share the exact site details with you due to a NDA, so I hope someone can give me a little help. I've got a project due today (Just HTML/CSS/JQuery). It has a lightbox, show/hide login menu and a slider is Easy Slider 1.5. Everything was working together, until I attempted to update to Easy Slider 1.7 (see link on same page, I'm too new to post more than 1 link). When I did so, JQuery stopped working for all the plugins. I've attempted to revert back to the original state, by undoing my work (didn't do much), ad JQuery remains broken. Firebug Error Console shared no errors. I can't find anything in the code no matter how hard I look at it. Can anyone help me troubleshoot this JQuery problem? Delivery is supposed to be tonight for the project. EDIT: Generic header info: <!-- Global Style Sheet --> <link rel="stylesheet" href="style.css" media="screen" type="text/css" /> <!-- Cufon --> <script src="cufon/cufon.js" type="text/javascript"></script> <script src="cufon/gotham_325-gotham_350.font.js" type="text/javascript"></script> <!-- jQuery Javascript --> <script type="text/javascript" language="javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript" language="javascript" src="js/jquery-ui-1.7.1.custom.min.js"></script> <script type="text/javascript" language="javascript" src="js/jquery.colorbox.js"></script> <script type="text/javascript" language="javascript" src="js/global.js"></script> <script type="text/javascript" language="javascript" src="js/home.js"></script> <script type="text/javascript"> $(document).ready(function() { $(".signin").click(function(e) { e.preventDefault(); $("fieldset#signin_menu").toggle(); $(".signin").toggleClass("menu-open"); }); $("fieldset#signin_menu").mouseup(function() { return false }); $(document).mouseup(function(e) { if($(e.target).parent("a.signin").length==0) { $(".signin").removeClass("menu-open"); $("fieldset#signin_menu").hide(); } }); }); </script> <script src="javascripts/jquery.tipsy.js" type="text/javascript"></script> <script type='text/javascript'> $(function() { $('#forgot_username_link').tipsy({gravity: 'w'}); }); </script> <script type="text/javascript" language="javascript" src="js/easySlider1.5.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#slider").easySlider(); }); </script> <script type="text/javascript"> $(document).ready(function(){ $(".regbox").colorbox({iframe:true, innerWidth:270, innerHeight:270}); }); </script>

    Read the article

  • Michael Hartl's rails tutorial: reusing sessions resource for multiple User types

    - by ntaj
    I'm learning Ruby on Rails through Micheal Hartl's tutorial. In my web application, I require two types of Users, called publishers and subscribers. Currently I have a publishers resource and a subscribers resource. I'd like both of them to be able to use the sessions resource for signin/signout. I'm looking for some direction on how to implement this. Should my publisher and subscriber resource inherit from the User resource, so that, for example, the following code works through polymorphism? def create user = User.find_by_email(params[:session][:email]) if user && user.authenticate(params[:session][:password]) # Sign the user in and redirect to the user's show page. else # Create an error message and re-render the signin form. end end The publisher and subscriber do not have many common fields and different capabilities, so I think they should be modeled as two separate resources, but how to have them share the Sessions resource?

    Read the article

  • Ios Parse Login

    - by user3806600
    I am programming an IOS app that will use parse to login a user. Using storyboard I have the login button connected to another view controller with the push segue. Whether the username and password are correct the button selection always goes to the new view controller. I might be doing this all wrong. Any help is appreciated. Here is my code: - (IBAction)signIn:(id)sender { [PFUser logInWithUsernameInBackground:self.emailField.text password:self.passwordField.text block:^(PFUser *user, NSError *error) { if (!error) { [self performSegueWithIdentifier:@"signIn" sender:nil]; } else { // The login failed. Check error to see why. } }]; }

    Read the article

  • login through twitter not working in osqa

    - by Pankaj Khurana
    Hi, I have installed osqa on a site hosted on hostgator. The login functionality is working for google,yahoo,facebook. But when i click on twitter icon its generating an exception. I have already added the twitter consumer key and the twitter consumer secret through admin interface. The exception i am getting is: HTTPError at /account/twitter/signin/ HTTP Error 401: Unauthorized Request Method: GET Request URL: http://mydomain/account/twitter/signin/?validate_email=yes Exception Type: HTTPError Exception Value: HTTP Error 401: Unauthorized Exception Location: /usr/lib/python2.4/urllib2.py in http_error_default, line 480 Python Executable: /usr/bin/python Python Version: 2.4.3 I am unable to trace out the reason for the same. Please help me on this. Thanks

    Read the article

  • TABINDEX not working on HyperLinks

    - by b0x0rz
    <asp:HyperLink ID="SignIn" runat="server" CssClass="SignIn" TabIndex="3">Sign In</asp:HyperLink> the problem with the above is that TABINDEX does not work. I have also a username and password TEXTBOXES and the tabindex works with them, but the hyperlink does not work. i need it also on other links, so replacing a sign in with a button is not helping me much, unless i replace all links with a button. how to figure out why the hyperlink's tabindex is not working? thnx edit ** more info ** <input name="ctl00$ctl00$GlobalPageContentPlaceHolder$SearchPageContentPlaceHolder$KeywordsTextbox" type="text" maxlength="80" id="KeywordsTextbox" class="KeywordsTextbox" /> <a id="GlobalPageContentPlaceHolder_SearchPageContentPlaceHolder_SearchLinkButton" class="SearchLinkButton" href="javascript:__doPostBack(&#39;ctl00$ctl00$GlobalPageContentPlaceHolder$SearchPageContentPlaceHolder$SearchLinkButton&#39;,&#39;&#39;)">Search Now</a> whn tab-ing it works for the input, but not for link.

    Read the article

  • PHP: question about passing parameters in URL's

    - by user248959
    Hi, i have this two lines: var_dump($parametros_post_signin); $this->redirect('prueba/aux?email='.$parametros_post_signin['signin']); the first one prints this: array 'signin' => array 'email_address' => string '' (length=0) 'password' => string '' (length=0) the second one takes to another action where i have this code: var_dump($request->getParameter('email')); that prints this: string 'password' (length=8) I expected it to print something like this: string '' (length=0) What should i do to the get value of the 'email_address' field ? Regards Javi

    Read the article

  • $.ajax + authentication + `@` in username

    - by Koning Baard XIV
    I am creating a web app which uses jQuery to authenticate: $.ajax({ url: "/session/create?format=json", type: "GET", dataType: "json", cache: false, username: $("#signin-email").val(), password: $("#signin-password").val(), success: function(data) { if(data.success) { success = true; } } }); The problem is that the code only makes the AJAX-request when the username does not include things like an @, which is required in my app. Can anyone help me with how I can do this? I do not mind changing the back-end a little bit, but requiring users to have an @-less email is not an option. Oh, my back-end is a Ruby-on-Rails app

    Read the article

  • Problem with sfRemember cookie / sfGuard Remember me

    - by Tom
    I'm using Symfony 1.4 with Doctrine. Sorry if this is a silly question but what exactly does one need to build on top of the sfDoctrineGuardPlugin to get the "remember me" functionality working? When I login a user, the sfRemember cookie is created with the default 15-day lifetime, and the remember key is saved in the plugin's sf_guard_remember_key table. Without any tweaks to the plugin, the sfGuardSecurityUser SignIn() method creates the cookie, but the Signout() method erases it, leaving no cookie unless you're logged in! Signin(): sfContext::getInstance()->getResponse()->setCookie($remember_cookie, $key, time() + $expiration_age); Signout(): sfContext::getInstance()->getResponse()->setCookie($remember_cookie, '', time() - $expiration_age); I can see that the database table saves the cookie as a relation of sf_guard_user, but that's not much good if the cookie is gone.... I'd be grateful if someone could tell me what I'm missing here, and ideally, if I prevent the Signout() method from removing the cookie, do I need to write code to read the cookie myself or is this automated somewhere/somehow? I've got box-standard Symfony 1.4 and sfDoctrineGuardPlugin installations. It all just seems totally wrong and the documentation on this is non-existent. Any help would appreciated.

    Read the article

  • Metro, Authentication, and the ASP.NET Web API

    - by Stephen.Walther
    Imagine that you want to create a Metro style app written with JavaScript and you want to communicate with a remote web service. For example, you are creating a movie app which retrieves a list of movies from a movies service. In this situation, how do you authenticate your Metro app and the Metro user so not just anyone can call the movies service? How can you identify the user making the request so you can return user specific data from the service? The Windows Live SDK supports a feature named Single Sign-On. When a user logs into a Windows 8 machine using their Live ID, you can authenticate the user’s identity automatically. Even better, when the Metro app performs a call to a remote web service, you can pass an authentication token to the remote service and prevent unauthorized access to the service. The documentation for Single Sign-On is located here: http://msdn.microsoft.com/en-us/library/live/hh826544.aspx In this blog entry, I describe the steps that you need to follow to use Single Sign-On with a (very) simple movie app. We build a Metro app which communicates with a web service created using the ASP.NET Web API. Creating the Visual Studio Solution Let’s start by creating a Visual Studio solution which contains two projects: a Windows Metro style Blank App project and an ASP.NET MVC 4 Web Application project. Name the Metro app MovieApp and the ASP.NET MVC application MovieApp.Services. When you create the ASP.NET MVC application, select the Web API template: After you create the two projects, your Visual Studio Solution Explorer window should look like this: Configuring the Live SDK You need to get your hands on the Live SDK and register your Metro app. You can download the latest version of the SDK (version 5.2) from the following address: http://www.microsoft.com/en-us/download/details.aspx?id=29938 After you download the Live SDK, you need to visit the following website to register your Metro app: https://manage.dev.live.com/build Don’t let the title of the website — Windows Push Notifications & Live Connect – confuse you, this is the right place. Follow the instructions at the website to register your Metro app. Don’t forget to follow the instructions in Step 3 for updating the information in your Metro app’s manifest. After you register, your client secret is displayed. Record this client secret because you will need it later (we use it with the web service): You need to configure one more thing. You must enter your Redirect Domain by visiting the following website: https://manage.dev.live.com/Applications/Index Click on your application name, click Edit Settings, click the API Settings tab, and enter a value for the Redirect Domain field. You can enter any domain that you please just as long as the domain has not already been taken: For the Redirect Domain, I entered http://superexpertmovieapp.com. Create the Metro MovieApp Next, we need to create the MovieApp. The MovieApp will: 1. Use Single Sign-On to log the current user into Live 2. Call the MoviesService web service 3. Display the results in a ListView control Because we use the Live SDK in the MovieApp, we need to add a reference to it. Right-click your References folder in the Solution Explorer window and add the reference: Here’s the HTML page for the Metro App: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>MovieApp</title> <!-- WinJS references --> <link href="//Microsoft.WinJS.1.0.RC/css/ui-dark.css" rel="stylesheet" /> <script src="//Microsoft.WinJS.1.0.RC/js/base.js"></script> <script src="//Microsoft.WinJS.1.0.RC/js/ui.js"></script> <!-- Live SDK --> <script type="text/javascript" src="/LiveSDKHTML/js/wl.js"></script> <!-- WebServices references --> <link href="/css/default.css" rel="stylesheet" /> <script src="/js/default.js"></script> </head> <body> <div id="tmplMovie" data-win-control="WinJS.Binding.Template"> <div class="movieItem"> <span data-win-bind="innerText:title"></span> <br /><span data-win-bind="innerText:director"></span> </div> </div> <div id="lvMovies" data-win-control="WinJS.UI.ListView" data-win-options="{ itemTemplate: select('#tmplMovie') }"> </div> </body> </html> The HTML page above contains a Template and ListView control. These controls are used to display the movies when the movies are returned from the movies service. Notice that the page includes a reference to the Live script that we registered earlier: <!-- Live SDK --> <script type="text/javascript" src="/LiveSDKHTML/js/wl.js"></script> The JavaScript code looks like this: (function () { "use strict"; var REDIRECT_DOMAIN = "http://superexpertmovieapp.com"; var WEBSERVICE_URL = "http://localhost:49743/api/movies"; function init() { WinJS.UI.processAll().done(function () { // Get element and control references var lvMovies = document.getElementById("lvMovies").winControl; // Login to Windows Live var scopes = ["wl.signin"]; WL.init({ scope: scopes, redirect_uri: REDIRECT_DOMAIN }); WL.login().then( function(response) { // Get the authentication token var authenticationToken = response.session.authentication_token; // Call the web service var options = { url: WEBSERVICE_URL, headers: { authenticationToken: authenticationToken } }; WinJS.xhr(options).done( function (xhr) { var movies = JSON.parse(xhr.response); var listMovies = new WinJS.Binding.List(movies); lvMovies.itemDataSource = listMovies.dataSource; }, function (xhr) { console.log(xhr.statusText); } ); }, function(response) { throw WinJS.ErrorFromName("Failed to login!"); } ); }); } document.addEventListener("DOMContentLoaded", init); })(); There are two constants which you need to set to get the code above to work: REDIRECT_DOMAIN and WEBSERVICE_URL. The REDIRECT_DOMAIN is the domain that you entered when registering your app with Live. The WEBSERVICE_URL is the path to your web service. You can get the correct value for WEBSERVICE_URL by opening the Project Properties for the MovieApp.Services project, clicking the Web tab, and getting the correct URL. The port number is randomly generated. In my code, I used the URL  “http://localhost:49743/api/movies”. Assuming that the user is logged into Windows 8 with a Live account, when the user runs the MovieApp, the user is logged into Live automatically. The user is logged in with the following code: // Login to Windows Live var scopes = ["wl.signin"]; WL.init({ scope: scopes, redirect_uri: REDIRECT_DOMAIN }); WL.login().then(function(response) { // Do something }); The scopes setting determines what the user has permission to do. For example, access the user’s SkyDrive or access the user’s calendar or contacts. The available scopes are listed here: http://msdn.microsoft.com/en-us/library/live/hh243646.aspx In our case, we only need the wl.signin scope which enables Single Sign-On. After the user signs in, you can retrieve the user’s Live authentication token. The authentication token is passed to the movies service to authenticate the user. Creating the Movies Service The Movies Service is implemented as an API controller in an ASP.NET MVC 4 Web API project. Here’s what the MoviesController looks like: using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using JWTSample; using MovieApp.Services.Models; namespace MovieApp.Services.Controllers { public class MoviesController : ApiController { const string CLIENT_SECRET = "NtxjF2wu7JeY1unvVN-lb0hoeWOMUFoR"; // GET api/values public HttpResponseMessage Get() { // Authenticate // Get authenticationToken var authenticationToken = Request.Headers.GetValues("authenticationToken").FirstOrDefault(); if (authenticationToken == null) { return new HttpResponseMessage(HttpStatusCode.Unauthorized); } // Validate token var d = new Dictionary<int, string>(); d.Add(0, CLIENT_SECRET); try { var myJWT = new JsonWebToken(authenticationToken, d); } catch { return new HttpResponseMessage(HttpStatusCode.Unauthorized); } // Return results return Request.CreateResponse( HttpStatusCode.OK, new List<Movie> { new Movie {Title="Star Wars", Director="Lucas"}, new Movie {Title="King Kong", Director="Jackson"}, new Movie {Title="Memento", Director="Nolan"} } ); } } } Because the Metro app performs an HTTP GET request, the MovieController Get() action is invoked. This action returns a set of three movies when, and only when, the authentication token is validated. The Movie class looks like this: using Newtonsoft.Json; namespace MovieApp.Services.Models { public class Movie { [JsonProperty(PropertyName="title")] public string Title { get; set; } [JsonProperty(PropertyName="director")] public string Director { get; set; } } } Notice that the Movie class uses the JsonProperty attribute to change Title to title and Director to director to make JavaScript developers happy. The Get() method validates the authentication token before returning the movies to the Metro app. To get authentication to work, you need to provide the client secret which you created at the Live management site. If you forgot to write down the secret, you can get it again here: https://manage.dev.live.com/Applications/Index The client secret is assigned to a constant at the top of the MoviesController class. The MoviesController class uses a helper class named JsonWebToken to validate the authentication token. This class was created by the Windows Live team. You can get the source code for the JsonWebToken class from the following GitHub repository: https://github.com/liveservices/LiveSDK/blob/master/Samples/Asp.net/AuthenticationTokenSample/JsonWebToken.cs You need to add an additional reference to your MVC project to use the JsonWebToken class: System.Runtime.Serialization. You can use the JsonWebToken class to get a unique and validated user ID like this: var user = myJWT.Claims.UserId; If you need to store user specific information then you can use the UserId property to uniquely identify the user making the web service call. Running the MovieApp When you first run the Metro MovieApp, you get a screen which asks whether the app should have permission to use Single Sign-On. This screen never appears again after you give permission once. Actually, when I first ran the app, I get the following error: According to the error, the app is blocked because “We detected some suspicious activity with your Online Id account. To help protect you, we’ve temporarily blocked your account.” This appears to be a bug in the current preview release of the Live SDK and there is more information about this bug here: http://social.msdn.microsoft.com/Forums/en-US/messengerconnect/thread/866c495f-2127-429d-ab07-842ef84f16ae/ If you click continue, and continue running the app, the error message does not appear again.  Summary The goal of this blog entry was to describe how you can validate Metro apps and Metro users when performing a call to a remote web service. First, I explained how you can create a Metro app which takes advantage of Single Sign-On to authenticate the current user against Live automatically. You learned how to register your Metro app with Live and how to include an authentication token in an Ajax call. Next, I explained how you can validate the authentication token – retrieved from the request header – in a web service. I discussed how you can use the JsonWebToken class to validate the authentication token and retrieve the unique user ID.

    Read the article

  • how to signup with openid in bitbucket?

    - by ajsie
    on Superuser when i click on Gmail it takes me to gmail's login page and i just login and i can use this account to login to Superuser. however, this is not the case in http://bitbucket.org/account/signin/ what should i type in as openid? i tried my gmail account but it said invalid.

    Read the article

  • CURL Authentication being lost?

    - by John Sloan
    I am authenticating a login via CURL just fine. I have a variable I am using to display the returned HTML, and it is returning my user control panel as if I am logged in. After authenticating, I want to communicate variables with a form on another page within the site; but for some reason the HTML from that page is returning a non-authenticated version of the header (as if the original authentication never took place.) I have a cookies.txt file with 777 permissions, and have tried just getting the contents of the same page shown when I authenticate and it is as if I am losing any associated session/cookie data somewhere along the way. Here is my curl.class file - <? class Curl { public $cookieJar = ""; // Make sure the cookies.txt file is read/write permissions public function __construct($cookieJarFile = 'cookies.txt') { $this->cookieJar = $cookieJarFile; } function setup() { $header = array(); $header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,"; $header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"; $header[] = "Cache-Control: max-age=0"; $header[] = "Connection: keep-alive"; $header[] = "Keep-Alive: 300"; $header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; $header[] = "Accept-Language: en-us,en;q=0.5"; $header[] = "Pragma: "; // browsers keep this blank. curl_setopt($this->curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7'); curl_setopt($this->curl, CURLOPT_HTTPHEADER, $header); curl_setopt($this->curl, CURLOPT_COOKIEJAR, $this->cookieJar); curl_setopt($this->curl, CURLOPT_COOKIEFILE, $this->cookieJar); curl_setopt($this->curl, CURLOPT_AUTOREFERER, true); curl_setopt($this->curl, CURLOPT_COOKIESESSION, true); curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true); } function get($url) { $this->curl = curl_init($url); $this->setup(); return $this->request(); } function getAll($reg, $str) { preg_match_all($reg, $str, $matches); return $matches[1]; } function postForm($url, $fields, $referer = '') { $this->curl = curl_init($url); $this->setup(); curl_setopt($this->curl, CURLOPT_URL, $url); curl_setopt($this->curl, CURLOPT_POST, 1); curl_setopt($this->curl, CURLOPT_REFERER, $referer); curl_setopt($this->curl, CURLOPT_POSTFIELDS, $fields); return $this->request(); } function getInfo($info) { $info = ($info == 'lasturl') ? curl_getinfo($this->curl, CURLINFO_EFFECTIVE_URL) : curl_getinfo($this->curl, $info); return $info; } function request() { return curl_exec($this->curl); } } ?> And here is my curl.php file - <? include('curl.class.php'); // This path would change to where you store the file $curl = new Curl(); $url = "http://www.site.com/public/member/signin"; $fields = "MAX_FILE_SIZE=50000000&dado_form_3=1&member[email]=email&member[password]=pass&x=16&y=5&member[persistent]=true"; // Calling URL $referer = "http://www.site.com/public/member/signin"; $html = $curl->postForm($url, $fields, $referer); echo($html); ?> <hr style="clear:both;"/> <? $html = $curl->postForm('http://www.site.com/index.php','nid=443&sid=733005&tab=post&eval=yes&ad=&MAX_FILE_SIZE=10000000&ip=63.225.235.30','http://www.site.com/public/member/signin'); echo $html; // This will show you the HTML of the current page you and logged into ?> Any ideas?

    Read the article

  • Firefox 4 stores passwords, but suddenly forgot that it did?

    - by Roland Taylor
    I am using firefox 4 as my default browser, but this is probably file system related. I will describe the problem and hopefully someone can point me in the right direction? Today I was using the browser as normal, all sign ins worked as usual, everything was normal. Then when I got back home tonight and opened it, none of my saved usernames/passwords would autofill/auto-signin anymore. I am guessing this must be something filesystem related, and it only happened this one time seemingly at random, so I don't think it is a firefox 4 bug. In fact, I think it might be something to do with suspending the system before I left? Anyone have any idea?

    Read the article

  • sending credential to linkedIn website and get oauth_verifier without sign in again

    - by akash kumar
    i am facing problem regarding sending credentials to other website and after login(automatically not clicked on sign in here) and get oauth_verifier value Detail is bellow.... I want to send emailaddress and password through form(submit button)from my website(i.e liferay portal) to another website(suppose linkedIn) it should automatically authorize and return oauth_verifier to my website. that mean i dont want my website user to submit emailaddress and password to linkedIn again. actually i want to take emailaddress and password in my website and show the user LinkedIn connection,message,job posting in my website it self,i dont want to redirect user to LinkedIn website and sign in there and again come back to my website. I have taken consumer key and secret key from LinkedIn for my aplication. i am using linkedIn api and getting oauth_verifier for access token but for that i have to take user to LinkedIn for signIn, actually it should happen in backend

    Read the article

  • .submit() doesn't work with Firefox and Greasemonkey...

    - by Shady
    I'm trying to make an auto login script and I'm stuck on the submit part... The source of the submit form from the website is <input type="submit" value="Sign In" class="signin" id="sumbitLogin"> and I'm trying document.getElementById("sumbitLogin").submit(); if I set an Attribute, for example the value, it changes just fine... How can I solve it?

    Read the article

  • Spring security - Reach users ID without passing it through every controller

    - by nilsi
    I have a design issue that I don't know how to solve. I'm using Spring 3.2.4 and Spring security 3.1.4. I have a Account table in my database that looks like this: create table Account (id identity, username varchar unique, password varchar not null, firstName varchar not null, lastName varchar not null, university varchar not null, primary key (id)); Until recently my username was just only a username but I changed it to be the email address instead since many users want to login with that instead. I have a header that I include on all my pages which got a link to the users profile like this: <a href="/project/users/<%= request.getUserPrincipal().getName()%>" class="navbar-link"><strong><%= request.getUserPrincipal().getName()%></strong></a> The problem is that <%= request.getUserPrincipal().getName()%> returns the email now, I don't want to link the user's with thier emails. Instead I want to use the id every user have to link to the profile. How do I reach the users id's from every page? I have been thinking of two solutions but I'm not sure: Change the principal to contain the id as well, don't know how to do this and having problem finding good information on the topic. Add a model attribute to all my controllers that contain the whole user but this would be really ugly, like this. Account account = entityManager.find(Account.class, email); model.addAttribute("account", account); There are more way's as well and I have no clue which one is to prefer. I hope it's clear enough and thank you for any help on this. ====== Edit according to answer ======= I edited Account to implement UserDetails, it now looks like this (will fix the auto generated stuff later): @Entity @Table(name="Account") public class Account implements UserDetails { @Id private int id; private String username; private String password; private String firstName; private String lastName; @ManyToOne private University university; public Account() { } public Account(String username, String password, String firstName, String lastName, University university) { this.username = username; this.password = password; this.firstName = firstName; this.lastName = lastName; this.university = university; } public String getUsername() { return username; } public String getPassword() { return password; } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } public void setUsername(String username) { this.username = username; } public void setPassword(String password) { this.password = password; } public void setFirstName(String firstName) { this.firstName = firstName; } public void setLastName(String lastName) { this.lastName = lastName; } public University getUniversity() { return university; } public void setUniversity(University university) { this.university = university; } public int getId() { return id; } public void setId(int id) { this.id = id; } @Override public Collection<? extends GrantedAuthority> getAuthorities() { // TODO Auto-generated method stub return null; } @Override public boolean isAccountNonExpired() { // TODO Auto-generated method stub return false; } @Override public boolean isAccountNonLocked() { // TODO Auto-generated method stub return false; } @Override public boolean isCredentialsNonExpired() { // TODO Auto-generated method stub return false; } @Override public boolean isEnabled() { // TODO Auto-generated method stub return true; } } I also added <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> To my jsp files and trying to reach the id by <sec:authentication property="principal.id" /> This gives me the following org.springframework.beans.NotReadablePropertyException: Invalid property 'principal.id' of bean class [org.springframework.security.authentication.UsernamePasswordAuthenticationToken]: Bean property 'principal.id' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter? ====== Edit 2 according to answer ======= I based my application on spring social samples and I never had to change anything until now. This are the files I think are relevant, please tell me if theres something you need to see besides this. AccountRepository.java public interface AccountRepository { void createAccount(Account account) throws UsernameAlreadyInUseException; Account findAccountByUsername(String username); } JdbcAccountRepository.java @Repository public class JdbcAccountRepository implements AccountRepository { private final JdbcTemplate jdbcTemplate; private final PasswordEncoder passwordEncoder; @Inject public JdbcAccountRepository(JdbcTemplate jdbcTemplate, PasswordEncoder passwordEncoder) { this.jdbcTemplate = jdbcTemplate; this.passwordEncoder = passwordEncoder; } @Transactional public void createAccount(Account user) throws UsernameAlreadyInUseException { try { jdbcTemplate.update( "insert into Account (firstName, lastName, username, university, password) values (?, ?, ?, ?, ?)", user.getFirstName(), user.getLastName(), user.getUsername(), user.getUniversity(), passwordEncoder.encode(user.getPassword())); } catch (DuplicateKeyException e) { throw new UsernameAlreadyInUseException(user.getUsername()); } } public Account findAccountByUsername(String username) { return jdbcTemplate.queryForObject("select username, firstName, lastName, university from Account where username = ?", new RowMapper<Account>() { public Account mapRow(ResultSet rs, int rowNum) throws SQLException { return new Account(rs.getString("username"), null, rs.getString("firstName"), rs.getString("lastName"), new University("test")); } }, username); } } security.xml <?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans" xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> <http pattern="/resources/**" security="none" /> <http pattern="/project/" security="none" /> <http use-expressions="true"> <!-- Authentication policy --> <form-login login-page="/signin" login-processing-url="/signin/authenticate" authentication-failure-url="/signin?error=bad_credentials" /> <logout logout-url="/signout" delete-cookies="JSESSIONID" /> <intercept-url pattern="/addcourse" access="isAuthenticated()" /> <intercept-url pattern="/courses/**/**/edit" access="isAuthenticated()" /> <intercept-url pattern="/users/**/edit" access="isAuthenticated()" /> </http> <authentication-manager alias="authenticationManager"> <authentication-provider> <password-encoder ref="passwordEncoder" /> <jdbc-user-service data-source-ref="dataSource" users-by-username-query="select username, password, true from Account where username = ?" authorities-by-username-query="select username, 'ROLE_USER' from Account where username = ?"/> </authentication-provider> <authentication-provider> <user-service> <user name="admin" password="admin" authorities="ROLE_USER, ROLE_ADMIN" /> </user-service> </authentication-provider> </authentication-manager> </beans:beans> And this is my try of implementing a UserDetailsService public class RepositoryUserDetailsService implements UserDetailsService { private final AccountRepository accountRepository; @Autowired public RepositoryUserDetailsService(AccountRepository repository) { this.accountRepository = repository; } @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { Account user = accountRepository.findAccountByUsername(username); if (user == null) { throw new UsernameNotFoundException("No user found with username: " + username); } return user; } } Still gives me the same error, do I need to add the UserDetailsService somewhere? This is starting to be something else compared to my initial question, I should maybe start another question. Sorry for my lack of experience in this. I have to read up.

    Read the article

  • Using oAuth (Twitter, LinkedIn) for login to a web app

    - by novaurora
    Should I use oAuth, for example LinkedIn or Twitter, as my signin mechanism for my app? It seems that most apps just use oAuth to connect other services to it, but they make you set up your own user/password after you use oAuth (including StackOverflow), and I'm not really sure why this is. Would love some insight here. Thank you.

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >