Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultAudience is the default audience used in justification tokens. It // can be overridden with the audiences in the justification request. DefaultAudience = "dev.abcxyz.jvs" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JVSAgent ¶
type JVSAgent struct { jvspb.JVSServiceServer Processor *Processor }
JVSAgent is the implementation of the justification verification server.
func (*JVSAgent) CreateJustification ¶
func (j *JVSAgent) CreateJustification(ctx context.Context, req *jvspb.CreateJustificationRequest) (*jvspb.CreateJustificationResponse, error)
type Processor ¶
type Processor struct { jvspb.UnimplementedJVSServiceServer // contains filtered or unexported fields }
Processor performs the necessary logic to validate a justification, then mints a token.
func NewProcessor ¶
func NewProcessor(kms *kms.KeyManagementClient, config *config.JustificationConfig) *Processor
NewProcessor creates a processor with the signer cache initialized.
func (*Processor) CreateToken ¶
func (p *Processor) CreateToken(ctx context.Context, requestor string, req *jvspb.CreateJustificationRequest) ([]byte, error)
CreateToken implements the create token API which creates and signs a JWT token if the provided justifications are valid.
func (*Processor) Validators ¶ added in v0.1.1
Validators returns all the validators allowed by this processor.
Click to show internal directories.
Click to hide internal directories.