18 lines
335 B
Go
18 lines
335 B
Go
package captiveportal
|
|
|
|
import "net/http"
|
|
|
|
type Identifier interface {
|
|
Identify(r *http.Request) (string, error)
|
|
}
|
|
|
|
type IdentifierFunc func(r *http.Request) (string, error)
|
|
|
|
func (f IdentifierFunc) Identify(r *http.Request) (string, error) {
|
|
return f(r)
|
|
}
|
|
|
|
func DefaultIdentifier(r *http.Request) (string, error) {
|
|
return "", nil
|
|
}
|