mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
WebClient: refactor long-running tasks to improve browser compatibility
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -29,6 +29,7 @@ const (
|
||||
SessionTypeResetCode
|
||||
SessionTypeOAuth2Auth
|
||||
SessionTypeInvalidToken
|
||||
SessionTypeWebTask
|
||||
)
|
||||
|
||||
// Session defines a shared session persisted in the data provider
|
||||
@@ -43,7 +44,7 @@ func (s *Session) validate() error {
|
||||
if s.Key == "" {
|
||||
return errors.New("unable to save a session with an empty key")
|
||||
}
|
||||
if s.Type < SessionTypeOIDCAuth || s.Type > SessionTypeInvalidToken {
|
||||
if s.Type < SessionTypeOIDCAuth || s.Type > SessionTypeWebTask {
|
||||
return fmt.Errorf("invalid session type: %v", s.Type)
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user