claimsprincipal

package
v0.1.313-herb-transcode.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddScopedIClaimsPrincipal added in v0.1.128

func AddScopedIClaimsPrincipal(builder *di.Builder)

AddScopedIClaimsPrincipal adds service to the DI container

func ClaimsPrincipalFromClaimsMap added in v0.1.139

func ClaimsPrincipalFromClaimsMap(claimsMap map[string]interface{}) contracts_claimsprincipal.IClaimsPrincipal

ClaimsPrincipalFromClaimsMap ...

func NewBoolClaim added in v0.1.272

func NewBoolClaim(claimType string, value bool) contracts_claimsprincipal.Claim

NewBoolClaim ...

func NewFloat64Claim added in v0.1.272

func NewFloat64Claim(claimType string, value float64) contracts_claimsprincipal.Claim

NewFloat64Claim ...

func NewIClaimsPrincipal added in v0.1.128

func NewIClaimsPrincipal() contracts_claimsprincipal.IClaimsPrincipal

NewIClaimsPrincipal for outside of the DI

func NewStringClaim added in v0.1.272

func NewStringClaim(claimType string, value string) contracts_claimsprincipal.Claim

NewStringClaim ...

Types

type ClaimsAST added in v0.1.298

ClaimsAST is a light-weight AST that allows for logical collections of claims to be defined and tested by GTM based services. Grouping is implicit in the tree's structure such that the root arrays form grouped AND operations, and branches are processed by their placement in the parent. For example: ```

ClaimsAST{
	Values: []string{"A", "B"},
	Or: []ClaimsAST{
		{Values: []string{"C", "D"}},
		{
			Values: []string{"E", "F"},
			And: []ClaimsAST{
				{Values: []string{"G", "H"}},
			},
		},
	},
	Not: []ClaimsAST{
		{
			Or: []ClaimsAST{
				{Values: []string{"I", "J"}},
			},
		},
	},
}

```

Is the equivalent to: if A && B && ((C || D) || (E || F || (G && H))) && !(I || J)

func (*ClaimsAST) String added in v0.1.298

func (p *ClaimsAST) String() string

String ...

func (*ClaimsAST) StringWithOperand added in v0.1.298

func (p *ClaimsAST) StringWithOperand(op contracts_auth.Operand) string

StringWithOperand ...

func (*ClaimsAST) Validate added in v0.1.298

func (p *ClaimsAST) Validate(claimsPrincipal contracts_claimsprincipal.IClaimsPrincipal) bool

Validate the assumptions made in a Claims object

func (*ClaimsAST) ValidateWithOperand added in v0.1.298

func (p *ClaimsAST) ValidateWithOperand(claimsPrincipal contracts_claimsprincipal.IClaimsPrincipal, op contracts_auth.Operand) bool

ValidateWithOperand ...

type EntryPointClaimsBuilder added in v0.1.155

type EntryPointClaimsBuilder struct {
	GrpcEntrypointClaimsMap map[string]*middleware_oidc.EntryPointConfig
}

EntryPointClaimsBuilder struct

func NewEntryPointClaimsBuilder added in v0.1.155

func NewEntryPointClaimsBuilder() *EntryPointClaimsBuilder

NewEntryPointClaimsBuilder ...

func (*EntryPointClaimsBuilder) AddMetaData added in v0.1.219

func (s *EntryPointClaimsBuilder) AddMetaData(fullMethodName string, metaData map[string]interface{}) *EntryPointClaimsBuilder

AddMetaData ...

func (*EntryPointClaimsBuilder) GetClaimsConfig added in v0.1.215

func (s *EntryPointClaimsBuilder) GetClaimsConfig(fullMethodName string) *middleware_oidc.ClaimsConfig

GetClaimsConfig ...

func (*EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimFactsMapAND added in v0.1.207

func (s *EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimFactsMapAND(fullMethodName string, claimFacts ...*services_claimfact.ClaimFact) *EntryPointClaimsBuilder

WithGrpcEntrypointPermissionsClaimFactsMapAND helper to add a single entrypoint config

func (*EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimFactsMapOR added in v0.1.207

func (s *EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimFactsMapOR(fullMethodName string, claimFacts ...*services_claimfact.ClaimFact) *EntryPointClaimsBuilder

WithGrpcEntrypointPermissionsClaimFactsMapOR helper to add a single entrypoint config

func (*EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimsMapAND added in v0.1.155

func (s *EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimsMapAND(fullMethodName string, claims ...contracts_core_claimsprincipal.Claim) *EntryPointClaimsBuilder

WithGrpcEntrypointPermissionsClaimsMapAND helper to add a single entrypoint config

func (*EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimsMapANDTYPE added in v0.1.204

func (s *EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimsMapANDTYPE(fullMethodName string, claimTypes ...string) *EntryPointClaimsBuilder

WithGrpcEntrypointPermissionsClaimsMapANDTYPE helper to add a single entrypoint config

func (*EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimsMapOR added in v0.1.155

func (s *EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimsMapOR(fullMethodName string, claims ...contracts_core_claimsprincipal.Claim) *EntryPointClaimsBuilder

WithGrpcEntrypointPermissionsClaimsMapOR helper to add a single entrypoint config

func (*EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimsMapORTYPE added in v0.1.204

func (s *EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimsMapORTYPE(fullMethodName string, claimTypes ...string) *EntryPointClaimsBuilder

WithGrpcEntrypointPermissionsClaimsMapORTYPE helper to add a single entrypoint config

func (*EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimsMapOpen added in v0.1.155

func (s *EntryPointClaimsBuilder) WithGrpcEntrypointPermissionsClaimsMapOpen(fullMethodName string) *EntryPointClaimsBuilder

WithGrpcEntrypointPermissionsClaimsMapOpen helper to add a single entrypoint config

type EntryPointClaimsBuilderV2 added in v0.1.298

type EntryPointClaimsBuilderV2 struct {
	GrpcEntrypointClaimsMap map[string]*EntryPointConfig
}

EntryPointClaimsBuilderV2 struct

func NewEntryPointClaimsBuilderV2 added in v0.1.298

func NewEntryPointClaimsBuilderV2() *EntryPointClaimsBuilderV2

NewEntryPointClaimsBuilderV2 ...

func (*EntryPointClaimsBuilderV2) DumpExpressions added in v0.1.306

func (s *EntryPointClaimsBuilderV2) DumpExpressions()

DumpExpressions ...

func (*EntryPointClaimsBuilderV2) GetClaimsAST added in v0.1.298

func (s *EntryPointClaimsBuilderV2) GetClaimsAST(fullMethodName string) *ClaimsAST

GetClaimsAST ...

func (*EntryPointClaimsBuilderV2) WithGrpcEntrypointClams added in v0.1.298

func (s *EntryPointClaimsBuilderV2) WithGrpcEntrypointClams(fullMethodName string, claims ...contracts_claimfact.IClaimFact) *EntryPointClaimsBuilderV2

WithGrpcEntrypointClams helper to add a single entrypoint config

func (*EntryPointClaimsBuilderV2) WithGrpcEntrypointPermissionsClaimsMapOpen added in v0.1.298

func (s *EntryPointClaimsBuilderV2) WithGrpcEntrypointPermissionsClaimsMapOpen(fullMethodName string) *EntryPointClaimsBuilderV2

WithGrpcEntrypointPermissionsClaimsMapOpen helper to add a single entrypoint config

type EntryPointConfig added in v0.1.298

type EntryPointConfig struct {
	FullMethodName string     `mapstructure:"FULL_METHOD_NAME"`
	ClaimsAST      *ClaimsAST `mapstructure:"CLAIMS_CONFIG"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL