Oauth2 server - laviua/komock GitHub Wiki

httpServers:
  -
    enabled: true
    name: auth-server
    port: 8080
    routes:
      -
        httpMethod: POST
        url: /oauth/token
        contentType: "application/json"
        responseBody: '{"access_token" : "ya29S6ZQbiBQpA5Rz8oty00xj-xydfdfddteerer-1eM",  "token_type" : "Bearer",  "expires_in" : 3600}'
        code: 200
      -
        httpMethod: GET
        url: /anymask/*/anypath/
        contentType: text/plain
        responseBody: Hello World. Test url mask with additional text
        code: 200

Testing by curl:

curl -X POST "http://127.0.0.1:8080/oauth/token"

You should get the following response:

{"access_token" : "ya29S6ZQbiBQpA5Rz8oty00xj-xydfdfddteerer-1eM",  "token_type" : "Bearer",  "expires_in" : 3600}