Skip to content

Commit 4bd401c

Browse files
karmirojer
authored andcommitted
[authn] Added the Labels property to the TokenDBValue struct (cesanta#217)
This patch extends the `TokenDBValue` struct in order to allow storing "labels" associated with a user directly in the data structure, ie. without a need for secondary storage. The primary motivation is related to the possibility of storing user's Github teams as `labels`, and using them in the ACL configuration.
1 parent fb1183a commit 4bd401c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

auth_server/authn/tokendb.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ type TokenDBValue struct {
7070
// DockerPassword is the temporary password we use to authenticate Docker users.
7171
// Generated at the time of token creation, stored here as a BCrypt hash.
7272
DockerPassword string `json:"docker_password,omitempty"`
73+
Labels Labels `json:"labels,omitempty"`
7374
}
7475

7576
// NewTokenDB returns a new TokenDB structure

0 commit comments

Comments
 (0)