Download the binary located here and and deploy it in a tomcat server. Alternatively, you can you can build the OAuth Server from scratch and start the server by issuing the
mvn jetty:runcommand in the
Tip: We have done the following changes to the Web application you just downloaded:
apis.application.propertiesfile is copied to the classpath.
- All the URLs starting with
localhostare replaced by the loop back IP (127.0.0.1)
org.surfnet.oaaas.noop.NoopAuthenticatorauthenticator is set as the default authenticator.
- Token expiry time is increased to 99999 seconds. This ensures that the tokens issued for the Web client lasts several months.
Move the Web application to the ROOT context to ensure that the Surf Oauth Web applications works on Tomcat.
rm -rf tomcat7/webapps/ROOT mv tomcat7/webapps/surf-oauth tomcat7/webapps/ROOT
- Access http://127.0.0.1:8080/ to see the following page:
The server is now up and running. Next, let's create a Resource Server and an OAuth Client.
- In Surf OAuth UI, click the Resource Servers link where all the OAuth clients are grouped together, and register a resource server representing WSO2 API Manager. Also, add two scopes named
scope1. You will use them when creating clients.
The front end is now registered as a distinct client with the authorization server.
- Pick an active access token from the above list. You use it to create clients through the API Manager.
- Get a registration endpoint to register the client with. As Surf OAuth doesn’t support a spec-compliant client registration yet, you can use an endpoint with similar capabilities. For example, you can enable Developer Tools in Google Chrome to see the URL and the request being sent as shown below: