No description, website, or topics provided.
Switch branches/tags
Nothing to show
Pull request Compare This branch is even with burrsutter:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

cordovaendpoint project maps to

It provides REST endpoints for my Apache Cordova/Phonegap Tutorial (not published).

It includes an example of secured by basic auth JAX-RS endpoint as well.

Open URLs:

Basic Auth Secured: which maps to which maps to

User: guest Password: password

Update .openshift/config/standalone.xml to have

           <security-domain name="other" cache-type="default">
              <login-module code="UsersRoles" flag="required">
                <module-option name="usersProperties" value="${env.OPENSHIFT_DATA_DIR}/"/>
                <module-option name="rolesProperties" value="${env.OPENSHIFT_DATA_DIR}/"/>

           <security-domain name="jboss-web-policy" cache-type="default">
                   <policy-module code="Delegating" flag="required"/>
           <security-domain name="jboss-ejb-policy" cache-type="default">
                   <policy-module code="Delegating" flag="required"/>

and git push it.

Create and via SSH in $OPENSHIFT_DATA_DIR

The password in the file can be clear text

Basic Auth is a bit tricky to setup:

  • standalone.xml needs to have the appropriate login-module
  • jboss-web.xml needs to point to it via security-domain=other in standalone.xml
  • web.xml points to the UsersRoles in the standalone.xml
  • need to update the two .properties files - via SSH
  • JAX-RS code uses @RolesAllowed to map in the role names

Note: I believe updates to require an app restart, you can simply make a small change to web.xml and git push it