auth/internal/domain/session.go

28 lines
663 B
Go
Raw Normal View History

2022-01-08 10:52:55 +00:00
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",
}
}