Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HToken ¶
type HToken struct {
jwt.Token
}
HToken htoken is a jwt token for harbor robot account, which contains the robot ID, project ID and the access permission for the project. It used for authn/authz for robot account in Harbor.
func ParseWithClaims ¶
ParseWithClaims ...
type Options ¶
type Options struct { SignMethod jwt.SigningMethod PublicKey []byte PrivateKey []byte TTL time.Duration Issuer string }
Options ...
type RobotClaims ¶
type RobotClaims struct { jwt.StandardClaims TokenID int64 `json:"id"` ProjectID int64 `json:"pid"` Access []*rbac.Policy `json:"access"` }
RobotClaims implements the interface of jwt.Claims
func (RobotClaims) Valid ¶
func (rc RobotClaims) Valid() error
Valid valid the claims "tokenID, projectID and access".
Click to show internal directories.
Click to hide internal directories.