Add documentation for authentication methods

Add swagger security definitions to settings and security parameters
to method annotations. Update the automated documentation file.

Issue: HIC-171
Change-Id: I34610f98186fb04664855ecbcfa3736b9c59c6c0
diff --git a/documentation/api-endpoints.md b/documentation/api-endpoints.md
index 177bc4f..a6bf64a 100644
--- a/documentation/api-endpoints.md
+++ b/documentation/api-endpoints.md
@@ -54,6 +54,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -134,6 +142,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -177,6 +193,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -243,6 +267,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -324,6 +356,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -366,6 +406,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -446,6 +494,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -530,6 +586,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -632,6 +696,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -699,6 +771,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -781,6 +861,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -824,6 +912,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -905,6 +1001,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -966,6 +1070,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1037,6 +1149,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1079,6 +1199,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1157,6 +1285,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1238,6 +1374,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1295,6 +1439,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1350,6 +1502,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1433,6 +1593,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1477,6 +1645,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1538,6 +1714,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1608,6 +1792,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1651,6 +1843,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1720,6 +1920,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1802,6 +2010,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1845,6 +2061,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1905,6 +2129,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -1974,6 +2206,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2016,6 +2256,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2095,6 +2343,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2138,6 +2394,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2195,6 +2459,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2258,6 +2530,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2300,6 +2580,14 @@
 * hiccup
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2377,6 +2665,14 @@
 * hiccup_stats
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2431,6 +2727,14 @@
 * hiccup_stats
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2487,6 +2791,14 @@
 * hiccup_stats
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2530,6 +2842,14 @@
 * hiccup_stats
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+|**apiKey**|**[Device token authentication](#device-token-authentication)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2594,6 +2914,13 @@
 * hiccup_stats
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2660,6 +2987,13 @@
 * hiccup_stats
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2704,6 +3038,13 @@
 * hiccup_stats
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2768,6 +3109,13 @@
 * hiccup_stats
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -2834,6 +3182,13 @@
 * hiccup_stats
 
 
+#### Security
+
+|Type|Name|
+|---|---|
+|**oauth2**|**[Google OAuth](#google-oauth)**|
+
+
 #### Example HTTP request
 
 ##### Request path
@@ -3018,9 +3373,22 @@
 <a name="securityscheme"></a>
 ## Security
 
-<a name="basic"></a>
-### basic
-*Type* : basic
+<a name="device-token-authentication"></a>
+### Device token authentication
+Authenticate using a token that was returned on successful registration of a new device. The token can only be used to authenticate requests that target the device with the matching UUID. The token has to be put in the request header: 'Authorization: Token <AUTH_TOKEN>'
+
+*Type* : apiKey  
+*Name* : Authorization  
+*In* : HEADER
+
+
+<a name="google-oauth"></a>
+### Google OAuth
+Authenticate using a Google account. Only E-mail addresses in the @fairphone.com domain are allowed.
+
+*Type* : oauth2  
+*Flow* : implicit  
+*Token URL* : /accounts/google/login/callback/
 
 
 
diff --git a/documentation/swagger.properties b/documentation/swagger.properties
index 3f6948d..31dd818 100644
--- a/documentation/swagger.properties
+++ b/documentation/swagger.properties
@@ -1,5 +1,5 @@
 swagger2markup.markupLanguage=MARKDOWN
 swagger2markup.generatedExamplesEnabled=true
 swagger2markup.flatBodyEnabled=true
-swagger2markup.pathSecuritySectionEnabled=false
+swagger2markup.pathSecuritySectionEnabled=true
 swagger2markup.interDocumentCrossReferencesEnabled=true