Documentation
¶
Overview ¶
Package invitation defines Holon's invitation operation. SCIM 2.0 has no invitation and each backend invites differently, so no standard applies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalid = errors.New("invitation invalid") )
Functions ¶
Types ¶
type Backend ¶
type Backend interface {
Invite(context.Context, Invitation) (Result, error)
}
Backend sends invitations. Invite is idempotent on Email: a repeat re-sends. ErrInvalid reports an address or group the backend refuses.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client calls Handler from Holon's side.
type Invitation ¶
type Invitation struct {
Email string `json:"email"`
Groups []string `json:"groups,omitempty"`
Lifetime time.Duration `json:"lifetime"`
}
Invitation asks the backend to make sure the person exists, place them in Groups, which are SCIM Group ids, and send them a way to finish setting up. The link is valid for Lifetime and no longer, and is refused once the person has finished setting up. On the wire Lifetime is an integer number of seconds.
func (Invitation) MarshalJSON ¶
func (i Invitation) MarshalJSON() ([]byte, error)
func (*Invitation) UnmarshalJSON ¶
func (i *Invitation) UnmarshalJSON(data []byte) error