Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a653274
feat: add handler placeholder functions
paanSinghCoder Aug 22, 2025
780ab66
refactor: move session handlers to session file
paanSinghCoder Aug 22, 2025
08e8882
feat: add transform to pb helper emthod
paanSinghCoder Aug 22, 2025
d5a5905
feat: add ListSession service
paanSinghCoder Aug 25, 2025
554e3bc
feat: add handler and service
paanSinghCoder Aug 25, 2025
4643e0d
feat: add handler for revokesession
paanSinghCoder Aug 25, 2025
9aca9b9
feat: add ping active service
paanSinghCoder Aug 25, 2025
84f424e
feat: List session data definition
paanSinghCoder Aug 26, 2025
126c554
chore: make proto
paanSinghCoder Aug 26, 2025
22d7527
feat: add current time for deleted_at timestamp
paanSinghCoder Aug 26, 2025
f6ae6cb
fix: remove duplicate SoftDelete
paanSinghCoder Aug 28, 2025
1ed5bff
chore: add mocks
paanSinghCoder Sep 1, 2025
dfd392d
Merge branch 'main' into feat/session
paanSinghCoder Sep 1, 2025
dfec494
fix: connect standard
paanSinghCoder Sep 1, 2025
3e858ed
fix: formatting
paanSinghCoder Sep 1, 2025
bc2e610
feat: add db query
paanSinghCoder Sep 1, 2025
781ff93
chore: edit comment
paanSinghCoder Sep 1, 2025
a571e23
chore: commit package.lock
paanSinghCoder Sep 1, 2025
ecb22fc
Merge branch 'main' into feat/session
paanSinghCoder Sep 2, 2025
9f7091a
Revert "chore: commit package.lock"
paanSinghCoder Sep 3, 2025
afb5f99
Revert "Revert "chore: commit package.lock""
paanSinghCoder Sep 3, 2025
be2ec11
Merge branch 'main' into feat/session
paanSinghCoder Sep 17, 2025
103e8b0
fix: move validation to proto
paanSinghCoder Sep 17, 2025
41366b5
chore: move error to connect
paanSinghCoder Sep 17, 2025
68898c5
feat(Session): Fetch metadata in create session (#1122)
paanSinghCoder Sep 18, 2025
7b60b4d
feat (Session): list sessions admin (#1128)
paanSinghCoder Sep 18, 2025
ce79142
Feat/admin revoke session (#1131)
paanSinghCoder Sep 18, 2025
e01b087
chore: fmt file
paanSinghCoder Sep 18, 2025
d9d6b7f
Merge branch 'main' into feat/session
paanSinghCoder Sep 18, 2025
9912429
chore: make proto
paanSinghCoder Sep 19, 2025
43e2f12
chore: make proto
paanSinghCoder Sep 19, 2025
cdb6e96
fix: get session auth check
paanSinghCoder Sep 19, 2025
418659d
chore: remove Heartbeat redundant function
paanSinghCoder Sep 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions billing/stripetest/mocks/backend.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions core/authenticate/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ type SessionConfig struct {
// Validity is the duration for which the session is valid
Validity time.Duration `mapstructure:"validity" yaml:"validity" default:"720h"`
Secure bool `mapstructure:"secure" yaml:"secure" default:"false"`
// Headers configuration for session metadata collection
Headers SessionMetadataHeaders `yaml:"headers" mapstructure:"headers"`
}

type SessionMetadataHeaders struct {
ClientIP string `yaml:"client_ip" mapstructure:"client_ip" default:"x-frontier-ip"`
ClientCountry string `yaml:"client_country" mapstructure:"client_country" default:"x-frontier-country"`
ClientCity string `yaml:"client_city" mapstructure:"client_city" default:"x-frontier-city"`
}

type OIDCConfig struct {
Expand Down
61 changes: 60 additions & 1 deletion core/authenticate/mocks/session_service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions core/authenticate/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ type FlowRepository interface {

type SessionService interface {
ExtractFromContext(ctx context.Context) (*frontiersession.Session, error)
ListSessions(ctx context.Context, userID string) ([]*frontiersession.Session, error)
}

type TokenService interface {
Expand Down
4 changes: 2 additions & 2 deletions core/authenticate/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func TestService_GetPrincipal(t *testing.T) {
AuthenticatedAt: time.Now().Add(-time.Hour),
ExpiresAt: time.Now().Add(time.Hour),
CreatedAt: time.Time{},
Metadata: nil,
Metadata: frontiersession.SessionMetadata{},
}
mockSessionService.EXPECT().ExtractFromContext(mock.Anything).Return(mockSess, nil)

Expand Down Expand Up @@ -130,7 +130,7 @@ func TestService_GetPrincipal(t *testing.T) {
AuthenticatedAt: time.Now().Add(-time.Hour),
ExpiresAt: time.Now().Add(-time.Hour),
CreatedAt: time.Time{},
Metadata: nil,
Metadata: frontiersession.SessionMetadata{},
}
mockSessionService.EXPECT().ExtractFromContext(mock.Anything).Return(mockSess, nil)

Expand Down
206 changes: 205 additions & 1 deletion core/authenticate/session/mocks/repository.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading