Documentation
¶
Index ¶
- func ForAttributeValues(fqns ...string) *authorizationv2.Resource
- func ForClientID(clientID string) *authorizationv2.EntityIdentifier
- func ForEmail(email string) *authorizationv2.EntityIdentifier
- func ForRegisteredResourceValueFqn(fqn string) *authorizationv2.Resource
- func ForToken(jwt string) *authorizationv2.EntityIdentifier
- func ForUserName(username string) *authorizationv2.EntityIdentifier
- func WithRequestToken() *authorizationv2.EntityIdentifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForAttributeValues ¶ added in v0.26.0
func ForAttributeValues(fqns ...string) *authorizationv2.Resource
ForAttributeValues returns a Resource containing the given attribute value FQNs. This is the most common Resource variant, used when authorizing against attribute values attached to data (e.g. those on a TDF). At least one FQN is required; calling with zero arguments panics.
func ForClientID ¶
func ForClientID(clientID string) *authorizationv2.EntityIdentifier
ForClientID returns an EntityIdentifier for a single subject entity identified by client ID.
func ForEmail ¶
func ForEmail(email string) *authorizationv2.EntityIdentifier
ForEmail returns an EntityIdentifier for a single subject entity identified by email address.
func ForRegisteredResourceValueFqn ¶ added in v0.26.0
func ForRegisteredResourceValueFqn(fqn string) *authorizationv2.Resource
ForRegisteredResourceValueFqn returns a Resource that references a single registered resource value by its fully qualified name, as stored in platform policy.
func ForToken ¶
func ForToken(jwt string) *authorizationv2.EntityIdentifier
ForToken returns an EntityIdentifier that resolves the entity from the given JWT. The authorization service will parse the token to derive the entity chain.
func ForUserName ¶
func ForUserName(username string) *authorizationv2.EntityIdentifier
ForUserName returns an EntityIdentifier for a single subject entity identified by username.
func WithRequestToken ¶
func WithRequestToken() *authorizationv2.EntityIdentifier
WithRequestToken returns an EntityIdentifier that instructs the authorization service to derive the entity from the request's Authorization header token.
Types ¶
This section is empty.