http://stackoverflow.com/questions/12422125/how-to-set-agentlib-property-for-mvn-tomcat-plugin-jpda
to DEBUG tomcat maven plugin, do follows:
    $ export MAVEN_OPTS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
    $ mvn tomcat7:run-war

Spring Security OAuth
http://projects.spring.io/spring-security-oauth/#quick-start
https://github.com/spring-projects/spring-security-oauth/tree/master/samples
    1. go to OAuth2 sample tonr directory, run mvn tomcat7:run
    2. browser open: http://localhost:8080/tonr2/
    3. login & view sparkr photos (URL redirection happens as follows)
        3.1 http://localhost:8080/tonr2/sparklr/photos
        3.2 http://localhost:8080/sparklr2/oauth/authorize?client_id=tonr&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Ftonr2%2Fsparklr%2Fphotos&response_type=code&scope=read+write&state=J6dAMc
        3.3 http://localhost:8080/sparklr2/login.jsp
    4. login sprklr on result page of above redirections (URL redirections happens as follows)
        4.1 http://localhost:8080/sparklr2/login.do (POST)
        4.2 http://localhost:8080/sparklr2/oauth/authorize?client_id=tonr&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Ftonr2%2Fsparklr%2Fphotos&response_type=code&scope=read+write&state=J6dAMc
    5. select the options to give permission and sumit (URL redirections happens as follows)
        5.1 http://localhost:8080/sparklr2/oauth/authorize
        5.2 http://localhost:8080/tonr2/sparklr/photos?code=KofGzN&state=J6dAMc
        5.3 http://localhost:8080/tonr2/sparklr/photos/1 (some links omitted...)


test own server, start mha (ccgv-social-java)
    http://127.0.0.1:8080/mha/oauth/authorize?client_id=tonr&redirect_uri=http%3A%2F%2F127.0.0.1%3A8080%2Fmha%2Fprofile%2Fme&response_type=code&scope=read+write&state=J6dAMc
  login
    http://127.0.0.1:8080/mha/oauth/authorize?client_id=tonr&redirect_uri=http%3A%2F%2F127.0.0.1%3A8080%2Fmha%2Fprofile%2Fme&response_type=code&scope=read+write&state=J6dAMc


use command line to test oauth2 access token (use your own token):
    curl -v -H 'Authorization:Bearer cfbc19fc-0409-41bc-8983-baeb34909457' 'http://127.0.0.1:8080/mha/api/v2/user/activities/summary'

