From 5065de4cff907b70ea3446888a7bad243744a8ab Mon Sep 17 00:00:00 2001 From: Jeroen Wijenbergh Date: Tue, 8 Mar 2022 13:13:14 +0100 Subject: OAuth: Begin implementation without OAuth2 lib - We want to use as little dependencies as possible. While the OAuth2 library is helpful, it is not needed. --- src/state.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/state.go') diff --git a/src/state.go b/src/state.go index 22dcaaf..5d054bb 100644 --- a/src/state.go +++ b/src/state.go @@ -1,15 +1,16 @@ package eduvpn type EduVPNState struct { - // The struct used for oauth - OAuth *EduVPNOauth - // The endpoints Endpoints *EduVPNEndpoints // Info passed by the client Name string Server string + + // OAuth + OAuthToken *EduVPNOAuthToken + OAuthSession *EduVPNOAuthSession } func Register(state *EduVPNState, name string, server string) error { @@ -26,7 +27,6 @@ func Register(state *EduVPNState, name string, server string) error { return nil } - var VPNStateInstance *EduVPNState func GetVPNState() *EduVPNState { @@ -35,5 +35,3 @@ func GetVPNState() *EduVPNState { } return VPNStateInstance } - - -- cgit v1.2.3