sessionlisting

package
v0.0.0-...-c4f7e29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DependencySet = wire.NewSet(
	wire.Struct(new(SessionListingService), "*"),
)

Functions

This section is empty.

Types

type IDPSessionProvider

type IDPSessionProvider interface {
	CheckSessionExpired(session *idpsession.IDPSession) (expired bool)
}

type OfflineGrantService

type OfflineGrantService interface {
	CheckSessionExpired(session *oauth.OfflineGrant) (bool, time.Time, error)
}

type Session

type Session struct {
	*model.Session
	// IsDevice has a different meaning for IDP session and offline grant
	// For IDP session, IsDevice is true only if it has active sso enabled offline grant.
	// So it may change.
	// All offline grant's IsDevice is true.
	IsDevice bool `json:"-"`
	// IsCurrent indicates if the session is current session
	IsCurrent bool `json:"-"`
}

Session in the sessionlisting package wrapped the model.Session to provide extra information for internal display

type SessionListingService

type SessionListingService struct {
	OAuthConfig   *config.OAuthConfig
	IDPSessions   IDPSessionProvider
	OfflineGrants OfflineGrantService
}

func (*SessionListingService) FilterForDisplay

func (s *SessionListingService) FilterForDisplay(sessions []session.Session, currentSession session.Session) ([]*Session, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL