Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceSession ¶
type ServiceSession struct {
// Identifier is the service session's unique identifier
//
// This is different from the Service Key's Identifier
Identifier string `json:"id"`
// Salt is the service session's salt
//
// This is randomly generated and used to hash the secret of the service session, and is
// different from the Service Key's Salt
Salt []byte `json:"salt"`
// Hash is the hashed secret of the service session
//
// This is generated from the service session's identifier, secret, and salt.
// The secret is never stored. This is different from the Service Key's Hash.
Hash []byte `json:"hash"`
// ServiceKeyIdentifier is the identifier of the Service Key that the service session is associated with
ServiceKeyIdentifier string `json:"service_key_identifier"`
// Creator is the creator's unique identifier
Creator string `json:"creator"`
// Organization is the organization that the Service Key is scoped to
Organization string `json:"organization"`
// Resources are the resources that the Service Key is authorized to access (optional)
Resources []servicekey.Resource `json:"resources"`
}
ServiceSession represents a user's authenticated service key session
func New ¶
func New(serviceKey *servicekey.ServiceKey) (*ServiceSession, []byte, error)
New returns a new service session for a user with the given service key
Click to show internal directories.
Click to hide internal directories.