aboutsummaryrefslogtreecommitdiff
path: root/service/auth.go
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-03-04 15:59:59 +0000
committerr <r@freesoftwareextremist.com>2020-03-04 15:59:59 +0000
commit911c9b79937a82bd4574972fa24f45f5cb922092 (patch)
treec0f0ce04c6e0d0e2b8a7b552b8cb887ceb362ad5 /service/auth.go
parent35a8c247d910f4a17aea5dd9df511f6e44bbc4bf (diff)
downloadbloat-911c9b79937a82bd4574972fa24f45f5cb922092.tar.gz
bloat-911c9b79937a82bd4574972fa24f45f5cb922092.zip
Remove session details on signout
Diffstat (limited to 'service/auth.go')
-rw-r--r--service/auth.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/service/auth.go b/service/auth.go
index 9e6f709..7fd238b 100644
--- a/service/auth.go
+++ b/service/auth.go
@@ -204,6 +204,19 @@ func (s *as) Signin(ctx context.Context, c *model.Client, sessionID string,
return
}
+func (s *as) Signout(ctx context.Context, c *model.Client) (err error) {
+ err = s.authenticateClient(ctx, c)
+ if err != nil {
+ return
+ }
+ err = checkCSRF(ctx, c)
+ if err != nil {
+ return
+ }
+ s.Service.Signout(ctx, c)
+ return
+}
+
func (s *as) Post(ctx context.Context, c *model.Client, content string,
replyToID string, format string, visibility string, isNSFW bool,
files []*multipart.FileHeader) (id string, err error) {