zitadel/internal/user/model/user_session_view.go
Fabi 198370325d
fix: user session with external login (#797)
* fix: user session with external login

* fix: tests

* fix: tests

* fix: change idp config name
2020-10-02 08:02:09 +02:00

66 lines
1.6 KiB
Go

package model
import (
"time"
req_model "github.com/caos/zitadel/internal/auth_request/model"
"github.com/caos/zitadel/internal/model"
)
type UserSessionView struct {
CreationDate time.Time
ChangeDate time.Time
State req_model.UserSessionState
ResourceOwner string
UserAgentID string
UserID string
UserName string
LoginName string
DisplayName string
SelectedIDPConfigID string
PasswordVerification time.Time
ExternalLoginVerification time.Time
MfaSoftwareVerification time.Time
MfaSoftwareVerificationType req_model.MfaType
MfaHardwareVerification time.Time
MfaHardwareVerificationType req_model.MfaType
Sequence uint64
}
type UserSessionSearchRequest struct {
Offset uint64
Limit uint64
SortingColumn UserSessionSearchKey
Asc bool
Queries []*UserSessionSearchQuery
}
type UserSessionSearchKey int32
const (
UserSessionSearchKeyUnspecified UserSessionSearchKey = iota
UserSessionSearchKeyUserAgentID
UserSessionSearchKeyUserID
UserSessionSearchKeyState
UserSessionSearchKeyResourceOwner
)
type UserSessionSearchQuery struct {
Key UserSessionSearchKey
Method model.SearchMethod
Value interface{}
}
type UserSessionSearchResponse struct {
Offset uint64
Limit uint64
TotalResult uint64
Result []*UserSessionView
}
func (r *UserSessionSearchRequest) EnsureLimit(limit uint64) {
if r.Limit == 0 || r.Limit > limit {
r.Limit = limit
}
}