diff options
author | zeripath <art27@cantab.net> | 2021-11-03 00:33:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-03 08:33:54 +0800 |
commit | 9d855bd6a1da51a656bede3a855b2cecc6a22f28 (patch) | |
tree | ac34d3039edafd1c8d7814e3ede09f1e22372073 /models/db | |
parent | 95da01c5cd946d6e6ba0b0110676d3df36ce85db (diff) | |
download | gitea-9d855bd6a1da51a656bede3a855b2cecc6a22f28.tar.gz gitea-9d855bd6a1da51a656bede3a855b2cecc6a22f28.zip |
Simplify Gothic to use our session store instead of creating a different store (#17507)
* Simplify Gothic to use our session store instead of creating a different store
We have been using xormstore to provide a separate session store for our OAuth2 logins
however, this relies on using gorilla context and some doubling of our session storing.
We can however, simplify and simply use our own chi-based session store. Thus removing
a cookie and some of the weirdness with missing contexts.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per review
Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per review
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Handle MaxTokenLength
Signed-off-by: Andrew Thornton <art27@cantab.net>
* oops
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'models/db')
-rw-r--r-- | models/db/store.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/models/db/store.go b/models/db/store.go deleted file mode 100644 index d5931e9521..0000000000 --- a/models/db/store.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2021 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package db - -import ( - "github.com/lafriks/xormstore" -) - -// CreateStore creates a xormstore for the provided table and key -func CreateStore(table, key string) (*xormstore.Store, error) { - store, err := xormstore.NewOptions(x, xormstore.Options{ - TableName: table, - }, []byte(key)) - - return store, err -} |