🏷️ Added Session domain

This commit is contained in:
Maxim Lebedev 2022-01-08 15:52:55 +05:00
parent 3965895e01
commit 1d14c7a347
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
package domain
import "testing"
type Session struct {
ClientID *ClientID
Me *Me
RedirectURI *URL
CodeChallengeMethod CodeChallengeMethod
Scope Scopes
Code string
CodeChallenge string
}
func TestSession(tb testing.TB) *Session {
tb.Helper()
return &Session{
ClientID: TestClientID(tb),
Me: TestMe(tb),
RedirectURI: TestURL(tb, "https://example.com/callback"),
CodeChallengeMethod: CodeChallengeMethodPLAIN,
Scope: Scopes{ScopeProfile, ScopeEmail},
Code: "abcdefg",
CodeChallenge: "hackme",
}
}