The sample authentication provider (HelloWorldAuthenticationProvider.js) contains a lot of comments and should give you a good idea of how to implement your own.
Overview of Process
- Download attached files and place in a convenient directory.
- Install a Java runtime, Java 1.6 or later is required
- From the command line, execute:
java -version (verify java version and functionality)
./hw.sh runs a simple hw.js test stub which invokes the auth provider locally outside of the API Server. When you are developing your own provider, this provides a quick turn-around environment. The full capabilities of the server are not available.
- Upload HelloWorldAuthenticationProvider.js to 'Your Libraries' on the Project tab and mark the library as Used.
- Enter 'helloWorldAuthenticationProviderCreate' as the name of the function. (Note the small 'h')
- Press the 'Save' button
- The two configuration parameters should be shown (see screen shot below)
- Press Save
- On the Settings tab for the project, select the new provider and save
- You should now be able to use your authentication provider by calling the
@authentication service. An easy way to test this is using the command line.