(c *gin.Context)
| 385 | } |
| 386 | |
| 387 | func (auth *AuthService) DeleteSessionCookie(c *gin.Context) error { |
| 388 | cookie, err := c.Cookie(auth.config.SessionCookieName) |
| 389 | |
| 390 | if err != nil { |
| 391 | return err |
| 392 | } |
| 393 | |
| 394 | err = auth.queries.DeleteSession(c, cookie) |
| 395 | |
| 396 | if err != nil { |
| 397 | return err |
| 398 | } |
| 399 | |
| 400 | c.SetCookie(auth.config.SessionCookieName, "", -1, "/", fmt.Sprintf(".%s", auth.config.CookieDomain), auth.config.SecureCookie, true) |
| 401 | |
| 402 | return nil |
| 403 | } |
| 404 | |
| 405 | func (auth *AuthService) GetSessionCookie(c *gin.Context) (repository.Session, error) { |
| 406 | cookie, err := c.Cookie(auth.config.SessionCookieName) |
no test coverage detected