Hi all,
I am still trying to got an oauth2 provider up. To begin with the oauth dance a client is supposed to send the user via redirect to the service provider and request authorization. So I do this:
send user to:
http://localhost:9001/oauth2/oauth/a...F%2Fspiegel.de
What I would expect is that my spring-security defined login page comes up... but instead, this is what is returned:
{
"error": "invalid_request",
"error_description": "A verification code must be supplied."
}
So what is wrong? Would I need to "secure" the /oauth/authorize mapping to have the login page com up?
Again including all my config below -thanx for your help!
Code:<http auto-config='true' access-denied-page="/login.jsp"> <intercept-url pattern="/rest/**" access="ROLE_USER" /> <intercept-url pattern="/request_token_authorized.jsp" access="ROLE_USER" /> <intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" /> <form-login authentication-failure-url="/login.jsp" default-target-url="/index.jsp" login-page="/login.jsp" login-processing-url="/login.do" /> <logout logout-success-url="/index.jsp" logout-url="/logout.do" /> </http> <authentication-manager> <authentication-provider> <user-service> <user name="sven" password="nevs" authorities="ROLE_USER, ROLE_ADMIN" /> <user name="demo" password="1234" authorities="ROLE_USER" /> </user-service> </authentication-provider> </authentication-manager> <beans:bean id="tokenServices" class="org.springframework.security.oauth2.provider.token.InMemoryOAuth2ProviderTokenServices"> <beans:property name="supportRefreshToken" value="true" /> </beans:bean> <oauth:provider client-details-service-ref="clientDetails" token-services-ref="tokenServices" authorization-url="/oauth/authorize" ><!-- authorization url is default --> <oauth:verification-code user-approval-page="/oauth/confirm_access" /> </oauth:provider> <oauth:client-details-service id="clientDetails"> <oauth:client clientId="my-trusted-client" authorizedGrantTypes="password,authorization_code,refresh_token" /> <oauth:client clientId="my-trusted-client-with-secret" authorizedGrantTypes="password,authorization_code,refresh_token" secret="somesecret" /> <oauth:client clientId="my-less-trusted-client" authorizedGrantTypes="authorization_code" /> <oauth:client clientId="tonr" authorizedGrantTypes="authorization_code" /> </oauth:client-details-service>


Reply With Quote
