UNPKG

arrow-docgen

Version:
30 lines (24 loc) 1.61 kB
# Authentication <% if (ENV==='development' && (AUTH_TYPE==='basic' || AUTH_TYPE==='apikey')) { -%> **API Keys** _Development_: `<%=AUTH_APIKEY_DEVELOPMENT%>` _Production_: `<%=AUTH_APIKEY_PRODUCTION%>` These API keys have been generated for your API project. These keys are randomly generated. You can change them by setting the value in your configuration file in the _conf_ directory of your project. However, make sure that you do not share this key with other projects and if you modify them, make sure that they are sufficiently unique. These keys must only be used by this project and not shared with other projects. <% } -%> <% if (AUTH_TYPE==='basic' || AUTH_TYPE==='apikey') { -%> You authenticate to the API by providing the required API key in the request. <% } -%> <% if (AUTH_TYPE==='basic'){ -%> This API is using [HTTP Basic Auth](http://en.wikipedia.org/wiki/Basic_access_authentication) for authentication. Provide the API key as the basic auth username. You do not need to provide a password (it should be an empty string value). <% } else if (AUTH_TYPE==='apikey'){ -%> This API is using an API Key for authentication. This API should only be accessed via HTTPS since the APIKey is transmitted as a HTTP header named `APIKey`. <% } else if (AUTH_TYPE==='plugin'){ -%> This API is using a custom API authentication scheme. <% } else { -%> This API is not using an authentication and all APIs are public. <% } -%> <% if (ENV==='development' && (AUTH_TYPE==='basic' || AUTH_TYPE==='apikey')) { -%> ```warning The API keys carry privileges, so be sure to keep them secret! ``` <% } -%>