Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial biscuit implementation #5

Merged
merged 26 commits into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
47ff548
wip
daeMOn63 Aug 11, 2020
9b2ce01
fix
daeMOn63 Aug 11, 2020
6277e27
add biscuit print
daeMOn63 Aug 12, 2020
81152b2
add biscuit.From and biscuit.FromWithSymbols
daeMOn63 Aug 12, 2020
2904a36
fix var -> const SymAuthority
daeMOn63 Aug 12, 2020
eeb6fd7
add BlockBuilder and Biscuit.Append
daeMOn63 Aug 13, 2020
29e5fc6
add test samples from github.com/CleverCloud/biscuit/tree/master/samples
daeMOn63 Aug 13, 2020
412aa46
add biscuit verifier and some tests
daeMOn63 Aug 13, 2020
965f564
Merge branch 'master' into biscuit_impl
daeMOn63 Aug 14, 2020
8b1a4b0
clean unused biscuit.CheckerType type
daeMOn63 Aug 17, 2020
5622a78
preallocate biscuit caveats slice
daeMOn63 Aug 18, 2020
c569de9
rename biscuit Print() to String()
daeMOn63 Aug 18, 2020
b5eaf34
fix builder panics on AddAuthority*
daeMOn63 Aug 18, 2020
d00a86c
rework biscuit unmarshalling
daeMOn63 Aug 18, 2020
1010d34
fix symbolTable.SplitOff to create a copy of returned slice
daeMOn63 Aug 18, 2020
e450496
rename signature serialize -> encode, deserialize -> decode
daeMOn63 Aug 18, 2020
b00a841
rename block Print -> String
daeMOn63 Aug 18, 2020
2d033a8
fix tests
daeMOn63 Aug 18, 2020
1486c9c
rename SymAuthority -> SymbolAuthority
daeMOn63 Aug 18, 2020
a57b947
remove unnecessary slice initialization
daeMOn63 Aug 19, 2020
140a041
remove pointers from builder methods
daeMOn63 Aug 19, 2020
5891050
unexport defaultUnmarshaller
daeMOn63 Aug 19, 2020
549030c
preallocate signedBlocks
daeMOn63 Aug 19, 2020
26305bb
fix blockBuilder slices references
daeMOn63 Aug 19, 2020
99715f0
check required symbols exists in table when generating world
daeMOn63 Aug 19, 2020
9091c6c
Fix wrong first symbol replace in AddAuthority*
daeMOn63 Aug 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rename block Print -> String
  • Loading branch information
daeMOn63 committed Aug 18, 2020
commit b00a84124f1cc0bae988042ecf40d63119846349
4 changes: 2 additions & 2 deletions biscuit.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (b *Biscuit) Serialize() ([]byte, error) {
func (b *Biscuit) String() string {
blocks := make([]string, len(b.blocks))
for i, block := range b.blocks {
blocks[i] = block.Print(b.symbols)
blocks[i] = block.String(b.symbols)
}

return fmt.Sprintf(`
Expand All @@ -174,7 +174,7 @@ Biscuit {
blocks: %v
}`,
*b.symbols,
b.authority.Print(b.symbols),
b.authority.String(b.symbols),
blocks,
)
}
Expand Down
2 changes: 1 addition & 1 deletion types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type Block struct {
context string
}

func (b *Block) Print(symbols *datalog.SymbolTable) string {
func (b *Block) String(symbols *datalog.SymbolTable) string {
debug := &datalog.SymbolDebugger{
SymbolTable: symbols,
}
Expand Down