Documentation ¶
Index ¶
- type SessionInfo
- type UserController
- func (u *UserController) GetPushSubscriptionKey(w http.ResponseWriter, r *http.Request)
- func (u *UserController) GetSessionInfo(w http.ResponseWriter, r *http.Request)
- func (u *UserController) Logout(w http.ResponseWriter, r *http.Request)
- func (u *UserController) RefreshAuth(w http.ResponseWriter, r *http.Request)
- func (u *UserController) RegisterPushSubscription(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionInfo ¶
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
func New ¶
func New(db *gorm.DB, config *models.Config, notificationsManager *services.NotificationsManager) *UserController
New creates an instance of the controller and sets its DB handle
func (*UserController) GetPushSubscriptionKey ¶
func (u *UserController) GetPushSubscriptionKey(w http.ResponseWriter, r *http.Request)
func (*UserController) GetSessionInfo ¶
func (u *UserController) GetSessionInfo(w http.ResponseWriter, r *http.Request)
func (*UserController) Logout ¶
func (u *UserController) Logout(w http.ResponseWriter, r *http.Request)
func (*UserController) RefreshAuth ¶
func (u *UserController) RefreshAuth(w http.ResponseWriter, r *http.Request)
RefreshAuth is called by the browser worker when it receives a push notification asking it to do so. The push notification is triggered by a VPN connection attempt when there is valid VPN "session". If we still have a valid web session, we can notify the VPN controller to create a new VPN session transparently and accept the connection attempt.
func (*UserController) RegisterPushSubscription ¶
func (u *UserController) RegisterPushSubscription(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.