Announcement Announcement Module
No announcement yet.
OAuth Login Configuration Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • OAuth Login Configuration

    Hi Spring - Community,

    I�m trying to develop my own oauth provider, which should be used by an android client, with the aid of the greenhouse application. If tried to get familiar with the greenhouse android client and the greenhouse web application. After this, the first step, was to include the source code of greenhouse in our webapplication. This works fine. But trying to connect to the our webapplication via the android client does not work. The client makes a request with an appkey and an app object is build. after this, the client redirects my to our login page, which is configured like this:

    <security:http auto-config='true' access-denied-page="/accessDenied.html">
    		<security:intercept-url pattern="/**" access="ROLE_STANDARD" />
    		<security:form-login login-page="/login.html" 
    			authentication-failure-url="/login_error.html" default-target-url="/pages/start/start.html"
    			always-use-default-target="true" />
    		<security:logout logout-success-url="/login.html"
    			invalidate-session="true" />
    	        <security:concurrency-control max-sessions="1" />
    	<security:authentication-manager alias="authenticationManager">
    			<security:password-encoder hash="md5" />

    and looks like this:

    <form accept-charset="utf-8" method="post" action="j_spring_security_check" name="logForm" >
    					<div style="margin-bottom: 10px;">
    					<input name="j_username1" value="#{msg.text_userName}" 
    						onkeydown="if(event.keyCode=='13') event.keyCode=9;" type="text" size="18" style="margin-right:5px"  
    						onblur="if(value=='')value='#{msg.text_userName}'" class="float_left" 
    						tabindex="1" />
    					<input name="j_password" type="password" value="#{msg.text_password}" 
    						onkeydown="if(event.keyCode=='13'){ concatenateUrlToUsername(); document.forms.logForm.submit();}" size="16"  class="go_right " 
    						tabindex="2" />
    					<input name="j_redirecturl" value="/login.html" type="hidden" />
    					<input name="j_username" value="" type="hidden" />
    					<div class="clearall" />
    					<div class="go_right submit-button"> 
    							<a onclick="concatenateUrlToUsername(); document.forms.logForm.submit()" 
                                                            onkeydown="if(event.keyCode=='13'){ makeLowerCaseUserName(); document.forms.logForm.submit();}"
    							tabindex="3" accesskey="l">Login</a>
    					<a href="password_forgotten.html" class="link_text go_right" style="margin-right: 15px">#{msg.text_pass_forgotten}</a>
    This works fine, but giving the user credentials and pressing the login button has no effect. I�ve tried to debugg the webapplication including the sources of spring security and oauth. In the greenhouse sample application the signincontroller and the usernamePasswordAuthenticationProvider are called:

    public class SigninController {
    	 * Render the signin form to the person as HTML in their web browser.
    	 * Returns void and relies in request-to-view-name translation to kick-in to resolve the view template to render.
    	@RequestMapping(value="/signin", method=RequestMethod.GET)
    	public void signin() {
    But in our application it isn�t. My question is, what do I have to configure that our login page calls these classes to fullfill the authentication process?