Skip to content

intents: openScopedSession #211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 10 additions & 2 deletions intents/intent.gen.go

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

10 changes: 10 additions & 0 deletions intents/intent.ridl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ struct Signature
enum IntentName: string
- initiateAuth
- openSession
- openScopedSession
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we sure we need this..?

keep in mind: we are not going to production with v2 scoped sessions via guard.. so just wondering why we need this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, tbh, I'm not that sure about the need for this intent anymore

the reason we might want it is to avoid the users having to authenticate each time... if we don't care about that and the ecosystems v2 work well without it, we can skip this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer we skip this for now please

- closeSession
- validateSession
- finishValidateSession
Expand Down Expand Up @@ -70,6 +71,15 @@ struct IntentDataOpenSession
- idToken?: string
+ go.tag.json = idToken,omitempty

struct IntentDataOpenScopedSession
- sessionId: string
+ go.field.name = SessionID
- scopedSessionId: string
+ go.field.name = ScopedSessionID
- wallet: string
- projectId: uint64
+ go.field.name = ProjectID

struct IntentDataCloseSession
- sessionId: string
+ go.field.name = SessionID
Expand Down
2 changes: 2 additions & 0 deletions intents/intent_typed.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ func IntentDataTypeToName[T any](t *T) IntentName {
return IntentName_initiateAuth
case *IntentDataOpenSession:
return IntentName_openSession
case *IntentDataOpenScopedSession:
return IntentName_openScopedSession
case *IntentDataCloseSession:
return IntentName_closeSession
case *IntentDataValidateSession:
Expand Down
Loading