mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
db shared sessions: set key and type as primary key
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -132,11 +132,11 @@ func (o *dbOAuth2Manager) addPendingAuth(pendingAuth oauth2PendingAuth) {
|
||||
}
|
||||
|
||||
func (o *dbOAuth2Manager) removePendingAuth(state string) {
|
||||
dataprovider.DeleteSharedSession(state) //nolint:errcheck
|
||||
dataprovider.DeleteSharedSession(state, dataprovider.SessionTypeOAuth2Auth) //nolint:errcheck
|
||||
}
|
||||
|
||||
func (o *dbOAuth2Manager) getPendingAuth(state string) (oauth2PendingAuth, error) {
|
||||
session, err := dataprovider.GetSharedSession(state)
|
||||
session, err := dataprovider.GetSharedSession(state, dataprovider.SessionTypeOAuth2Auth)
|
||||
if err != nil {
|
||||
return oauth2PendingAuth{}, errors.New("oauth2: unable to get the auth request for the specified state")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user