From ef6e25936d7aaa6fd4650d9ed27bd8b1c6d5c21d Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Fri, 6 May 2022 13:42:26 -0400 Subject: Auth level for a request is now updated when a session token in gemini is found. --- captain/response.f90 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'captain') diff --git a/captain/response.f90 b/captain/response.f90 index 03d420e..02ed6dd 100644 --- a/captain/response.f90 +++ b/captain/response.f90 @@ -461,6 +461,7 @@ contains end function request_has_query subroutine request_set_token(self, token) + use captain_db implicit none class(request), intent(inout)::self @@ -468,6 +469,7 @@ contains allocate(character(len=len_trim(token)) :: self%token) self%token = token + self%auth_level = get_session_auth_db(self%token) end subroutine request_set_token @@ -484,11 +486,12 @@ contains if(safe_to_deallocate) then deallocate(self%token) end if - - self%token => null() end if + self%token => null() + self%auth_level = 0 + end subroutine request_clear_token ! This routine is needed if we're stripping session identifiers -- cgit v1.2.3