Documentation ¶
Index ¶
- Variables
- type Details
- type Registry
- func (c *Registry) Delete(id string) error
- func (c *Registry) Get(id string) (*Details, error)
- func (c *Registry) LoadFromJSON(r io.Reader) error
- func (c *Registry) Put(client *Details) error
- func (c *Registry) PutUntil(expire time.Time, client *Details) error
- func (c *Registry) SaveToJSON(w io.Writer) error
- func (c *Registry) VerifyClient(client string) bool
- func (c *Registry) VerifyRedirect(client string, redirect string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("client id not found")
)
Errors
Functions ¶
This section is empty.
Types ¶
type Details ¶
type Details struct { // ID is the unique identifier for the client ID string `json:"id"` // Name is the user friendly name of the client application Name string `json:"name"` // Endpoints are the list of approved callback endpoints Endpoints []string `json:"endpoints"` }
Details represents a registered client application
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is the manager for all registered clients
func NewRegistry ¶
NewRegistry returns an initialized ClientRegistry
func (*Registry) LoadFromJSON ¶
LoadFromJSON loads clients encoded in JSON
func (*Registry) SaveToJSON ¶
SaveToJSON stores the registry clients to the io.Writer as JSON
func (*Registry) VerifyClient ¶
VerifyClient returns true if the client is a registered client
Click to show internal directories.
Click to hide internal directories.