sessionlisting

package
v0.0.0-...-81dc835 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 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(ctx context.Context, sessions []session.ListableSession, currentSession session.ResolvedSession) ([]*Session, error)

Jump to

Keyboard shortcuts

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