Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessPolicy ¶
type AccessPolicy struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Function string `json:"function"`
Parameters string `json:"parameters"`
Version int `json:"version"` // NB: this is currently emitted by the server, but not read by the server (for UI only)
}
AccessPolicy describes a token generation policy
func (AccessPolicy) Validate ¶
func (g AccessPolicy) Validate() error
Validate implements Validateable
type AccessPolicyContext ¶
type AccessPolicyContext struct {
Server ServerContext `json:"server"`
Client ClientContext `json:"client"`
}
AccessPolicyContext gets passed to the access policy's function(context, params) at resolution time
type ClientContext ¶
type ClientContext map[string]interface{}
ClientContext is passed by the client at resolution time
type GenerationPolicy ¶
type GenerationPolicy struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Function string `json:"function"`
Parameters string `json:"parameters"`
}
GenerationPolicy describes a token generation policy
func (GenerationPolicy) Validate ¶
func (g GenerationPolicy) Validate() error
Validate implements Validateable
type ResolverContext ¶
type ResolverContext struct {
Username string `json:"username"`
}
ResolverContext contains automatic data about the authenticated user/system at resolution time
type ServerContext ¶
type ServerContext struct {
// TODO: add token creation time
IPAddress string `json:"ip_address"`
Resolver ResolverContext `json:"resolver"`
Action Action `json:"action"`
}
ServerContext is automatically injected by the server at resolution time
Click to show internal directories.
Click to hide internal directories.