Skip to content

Authentication

devakumaraswamy edited this page Jan 8, 2020 · 7 revisions

Authentication

restaf-server can be used in the following modes:

  1. As a web server for static assets with no authentication

  2. With authentication

    • Implicit flow authentication
    • Coming soon: authorization_code authentication

No authentication

The env and Dockerfile for this scenario is in /env/static directory.

Examples of the env and Dockerfile for this scenario are here

env file: https://github.com/sassoftware/restaf-server/blob/master/env/static/app.env

docker file: https://github.com/sassoftware/restaf-server/blob/master/env/static/Dockerfile

The key values are the EXPOSE for port number and the APPENTRY.

To use this scenario modify these files as follows:

env file

This is primarily used to override the values set in Dockerfile. Setting CLIENTID here is a good practice.

  1. Set the CLIENTID to your implicit flow clientid

Docker file

  1. Set the EXPOSE port to your desired port no.
  2. Set the following to suit your needs
ENV APPHOST=localhost
ENV APPNAME=viyaapp
ENV APPLOC=./public
ENV APPENTRY=index.html

APPNAME

Assign a meaninful name for your app.

APPHOST

This can be one of the following values:

localhost|*|ipAddress|dns-name-of-server

If set to *, restaf-server will resolve it to the dns name using nodejs function os.hostname.

APPLOC

This is the directory where restaf can find the static assets of your app. This is relative to the root of your application. Typically this is ./public

APPENTRY

After a successful logon restaf will redirect to this entry specified via APPLOC.

Clone this wiki locally