Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSession ¶
func HandleLogout ¶
func HandleLogout(w http.ResponseWriter, r *http.Request)
HandleLogout godoc @Summary Log out a user @Description Terminates the user's session @Tags session @Accept json @Produce json @Param Authorization header string true "Bearer access token" @Success 200 {string} string "Session terminated successfully" @Failure 401 {object} model.ApiError @Failure 500 {object} model.ApiError @Router /oauth2/logout [post]
Types ¶
type Session ¶
type Session struct {
ID string
UserID string
AccessToken string
RefreshToken string
UserAgent string
IPAddress string
DeviceID string
LastActivityAt time.Time
CreatedAt time.Time
ExpiresAt time.Time
DeactivatedAt *time.Time
Location string
}
func SessionByAccessToken ¶
func SessionByID ¶
Click to show internal directories.
Click to hide internal directories.