If you do not use the Mashup UI to design your front-end application, you have to implement user authentication with the securityClient java client.
securityClient
It is provided by the CloudviewAPIClientsFactory factory, which takes the gateway as parameter and can instantiate any client.
CloudviewAPIClientsFactory
To retrieve the user tokens, you can use the authenticate method:
authenticate
securityClient.authenticate(securitySource, login, password, checkUserPassword);