| 1 | package auth |
| 2 | |
| 3 | import ( |
| 4 | "time" |
| 5 | |
| 6 | proof "github.com/FelineStateMachine/tinyrelay/protocol/auth" |
| 7 | ) |
| 8 | |
| 9 | // Validator and ChallengeManager preserve public verifier and replay-store |
| 10 | // identity for callers that have not migrated to protocol/auth. |
| 11 | type Validator = proof.Validator |
| 12 | type ChallengeManager = proof.ChallengeManager |
| 13 | |
| 14 | var ErrMissingAuthorization = proof.ErrMissingAuthorization |
| 15 | var ErrGRASP08Unauthorized = proof.ErrGRASP08Unauthorized |
| 16 | |
| 17 | func NewValidator(now func() time.Time) *Validator { return proof.NewValidator(now) } |
| 18 | func NewChallengeManager(relayURL string, now func() time.Time) *ChallengeManager { |
| 19 | return proof.NewChallengeManager(relayURL, now) |
| 20 | } |
| 21 | func IsBlossomAuthorization(header string) bool { return proof.IsBlossomAuthorization(header) } |
| 22 | func GRASP08RepositoryRoot(raw string) (string, bool) { return proof.GRASP08RepositoryRoot(raw) } |