2021-12-29 20:07:23 +00:00
|
|
|
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.
|
2022-01-08 10:53:58 +00:00
|
|
|
Subject *URL
|
2021-12-29 20:07:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func TestTicket(tb testing.TB) *Ticket {
|
|
|
|
tb.Helper()
|
|
|
|
|
|
|
|
return &Ticket{
|
2022-01-05 09:55:48 +00:00
|
|
|
Resource: TestURL(tb, "https://alice.example.com/private/"),
|
2022-01-08 10:53:58 +00:00
|
|
|
Subject: TestURL(tb, "https://bob.example.com/"),
|
2021-12-29 20:07:23 +00:00
|
|
|
Ticket: "32985723984723985792834",
|
|
|
|
}
|
|
|
|
}
|