Issue Type: Task Task
Affects Versions: 1.0.0.M8
Assignee: Unassigned
Components: examples
Created: 15/Jan/13 12:07 AM
Description:

Currently the user registration in the TODO app is not working. The reason for this is that there is a mismatch between the endpoint path that the client JS is using, 'enroll', and the path on the server side, 'register'.

One option is to change client side and override the default path:
client/src/main/webapp/js/app.js

 // Instantiate our authenticator
    var restAuth = AeroGear.Auth({
        name: "auth",
        settings: {
            agAuth: true,
            baseURL: "/todo-server/",
            endpoints: {enroll: "auth/register"}
        }
    }).modules.auth;

Another option would be to modify the server side @Path from 'register' to 'enroll':
org.aerogear.todo.server.security.rest.AuthenticationEndpoint.java

@POST
@Path("/enroll")
@Produces(MediaType.APPLICATION_JSON)
public Response register(final AeroGearUser user) {

    //TODO it should be done by admin screen
    idm.grant(user.getRole()).to(user);

    return authenticationManager.login(user.getUsername(), user.getPassword());

}

The dev-list thread (see 'Forum Reference') will decide which change should be made.

Fix Versions: 1.future
Project: AeroGear
Priority: Major Major
Reporter: Daniel Bevenius
Security Level: Public (Everyone can see)
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira