auth/internal/domain/ticket.go
Maxim Lebedev 4ce47440aa
♻️ Updated Me domain usage
* Updated TestMe for use custom url as in TestURL
* Use Me as Ticket Subject
2022-01-29 19:30:39 +05:00

27 lines
516 B
Go

package domain
import (
"testing"
)
type Ticket struct {
// A random string that can be redeemed for an access token.
Ticket string
// The access token will work at this URL.
Resource *URL
// The access token should be used when acting on behalf of this URL.
Subject *Me
}
func TestTicket(tb testing.TB) *Ticket {
tb.Helper()
return &Ticket{
Resource: TestURL(tb, "https://alice.example.com/private/"),
Subject: TestMe(tb, "https://bob.example.com/"),
Ticket: "32985723984723985792834",
}
}