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" validate:"notempty"`
Function string `json:"function" validate:"notempty"`
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 transformation policy
func (*AccessPolicy) Equals ¶ added in v0.6.0
func (a *AccessPolicy) Equals(other *AccessPolicy) bool
Equals returns true if the two policies are equal, ignoring the ID field
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 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
type TransformationPolicy ¶ added in v0.6.0
type TransformationPolicy struct {
ID uuid.UUID `json:"id"`
Name string `json:"name" validate:"notempty"`
Function string `json:"function" validate:"notempty"`
Parameters string `json:"parameters"`
}
TransformationPolicy describes a token transformation policy
func (*TransformationPolicy) Equals ¶ added in v0.6.0
func (g *TransformationPolicy) Equals(other *TransformationPolicy) bool
Equals returns true if the two policies are equal, ignoring the ID field
Click to show internal directories.
Click to hide internal directories.