34 lines
1.6 KiB
Go
34 lines
1.6 KiB
Go
// Package delegationtest provides a set of pre-built delegation tokens
|
|
// for a variety of test cases.
|
|
//
|
|
// For all delegation tokens, the name of the delegation token is the
|
|
// Issuer appended with the Audience. The tokens are generated so that
|
|
// an invocation can be created for any didtest.Persona.
|
|
//
|
|
// Delegation proof-chain names contain each didtest.Persona name in
|
|
// order starting with the root delegation (which will always be generated
|
|
// by Alice). This is the opposite of the list of cic.Cids that represent the
|
|
// proof chain.
|
|
//
|
|
// For both the generated delegation tokens granted to Carol's Persona and
|
|
// the proof chains containing Carol's delegations to Dan, if there is no
|
|
// suffix, the proof chain will be deemed valid. If there is a suffix, it
|
|
// will consist of either the word "Valid" or "Invalid" and the name of the
|
|
// field that has been altered. Only optional fields will generate proof
|
|
// chains with Valid suffixes.
|
|
//
|
|
// If changes are made to the list of Personas included in the chain, or
|
|
// in the variants that are specified, the generated Go file and delegation
|
|
// tokens stored in the data/ directory should be regenerated by running
|
|
// the following command in this directory:
|
|
//
|
|
// cd generator && go run .
|
|
//
|
|
// Generated delegation Tokens are stored in the data/ directory and loaded
|
|
// into the delegation.Loader.
|
|
// Generated references to these tokens and the tokens themselves are
|
|
// created in the token_gen.go file. See /token/invocation/invocation_test.go
|
|
// for an example of how these delegation tokens and proof-chains can
|
|
// be used during testing.
|
|
package delegationtest
|