From a97794bf91ca8c6325be35982df197ed6f69bf2e Mon Sep 17 00:00:00 2001
From: Mark <mark@openappstack.net>
Date: Tue, 29 Oct 2019 18:42:25 +0100
Subject: [PATCH] Add docstring

---
 consent_provider/db.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/consent_provider/db.py b/consent_provider/db.py
index 1705f33..148f6e8 100644
--- a/consent_provider/db.py
+++ b/consent_provider/db.py
@@ -35,6 +35,17 @@ class User():
         return appname in self.applications
 
     def get_oauth_session(self):
+        """Create openID Connect token
+
+        Use the userdata stored in the user object to create an OpenID Connect token.
+        The will be passed to Hydra, which will store it and server it to all OpenID Connect
+        Clients, that successfuly query the /userinfo endpoint. Every field in the "id_token"
+        dictionary can be accessed through standard scopes and claims.
+        See https://openid.net/specs/openid-connect-core-1_0.html#Claims
+
+        Returns:
+            OpenID Connect token of type dict
+        """
         return {
             "access_token": {},
             "id_token": {
-- 
GitLab