From 99af433d8af3da95f0527cb072d9f45bb9c9b97f Mon Sep 17 00:00:00 2001 From: tsmethurst Date: Thu, 25 Mar 2021 20:09:00 +0100 Subject: [PATCH] comments --- internal/module/oauth/oauth.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/internal/module/oauth/oauth.go b/internal/module/oauth/oauth.go index c69b626f9..2014f7d16 100644 --- a/internal/module/oauth/oauth.go +++ b/internal/module/oauth/oauth.go @@ -47,11 +47,17 @@ import ( ) const ( - appsPath = "/api/v1/apps" - authSignInPath = "/auth/sign_in" - oauthTokenPath = "/oauth/token" - oauthAuthorizePath = "/oauth/authorize" - SessionAuthorizedUser = "authorized_user" + appsPath = "/api/v1/apps" + authSignInPath = "/auth/sign_in" + oauthTokenPath = "/oauth/token" + oauthAuthorizePath = "/oauth/authorize" + // SessionAuthorizedUser is the key set in the gin context for the id of + // a User who has successfully passed Bearer token authorization. + // The interface returned from grabbing this key should be parsed as a string. + SessionAuthorizedUser = "authorized_user" + // SessionAuthorizedAccount is the key set in the gin context for the Account + // of a User who has successfully passed Bearer token authorization. + // The interface returned from grabbing this key should be parsed as a *gtsmodel.Account SessionAuthorizedAccount = "authorized_account" )