package
2.2.1+incompatible
Repository: https://github.com/goharbor/harbor.git
Documentation: pkg.go.dev
# Functions
AuthCodeURL returns the URL for OIDC provider's consent page.
ExchangeToken get the token from token provider via the code.
InjectGroupsToUser populates the group to DB and inject the group IDs to user model.
SetHardcodeVerifierForTest overwrite the default secret manager for testing.
TestEndpoint tests whether the endpoint is a valid OIDC endpoint.
UserInfoFromIDToken extract user info from ID token.
UserInfoFromToken tries to call the UserInfo endpoint of the OIDC provider, and consolidate with ID token to generate a UserInfo object, if the ID token is not in the input token struct, some attributes will be empty.
VerifySecret calls the manager to verify the secret.
VerifyToken verifies the ID token based on the OIDC settings.
# Structs
Conn wraps connection info of an OIDC endpoint.
SecretVerifyError wraps the different errors happened when verifying a secret for OIDC user.
Token wraps the attributes of a oauth2 token plus the attribute of ID token.
UserInfo wraps the information that is extracted via token.
# Interfaces
SecretManager is the interface for store and verify the secret.