claimfact

package
v0.1.316 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ClaimTypeAndValueExpression ...
	ClaimTypeAndValueExpression = "has_claim(%s|%s)"
	// ClaimTypeExpression ...
	ClaimTypeExpression = "has_claim_type(%s)"
)

Variables

This section is empty.

Functions

func NewClaimFact

NewClaimFact ...

func NewClaimFactType

func NewClaimFactType(claimType string) contracts_claimsprincipal.IClaimFact

Types

type ClaimFact

type ClaimFact struct {
	Claim     contracts_claimsprincipal.Claim
	Directive Directive
}

ClaimFact used for authorization

func (*ClaimFact) Expression

func (s *ClaimFact) Expression() string

Expression ...

func (*ClaimFact) HasClaim

func (s *ClaimFact) HasClaim(claimsPrincipal contracts_claimsprincipal.IClaimsPrincipal) bool

HasClaim ...

type Directive

type Directive int64

Directive tells if we want only the type validated vs type and value

const (
	// ClaimTypeAndValue ...
	ClaimTypeAndValue Directive = 0
	// ClaimType ...
	ClaimType = 1
)

Jump to

Keyboard shortcuts

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