Documentation ¶
Index ¶
Constants ¶
View Source
const ( JWT_AUTH_KEY = "JWT_AUTH" AuthorizationHeaderKey = "Authorization" )
View Source
const ( AccessCookieMaxAge = int(time.Second * 3600) RefreshCookieMaxAge = int(AccessCookieMaxAge * 3600) )
View Source
const ( AccessCookieKey = "access" RefreshCookKey = "refresh" QueryToken = "token" )
Variables ¶
This section is empty.
Functions ¶
func BasicAuthWithConfig ¶
func BasicAuthWithConfig(config middleware.BasicAuthConfig) echo.MiddlewareFunc
BasicAuthConfig is a local copy of echo's middleware.BasicAuthWithConfig
Types ¶
type AccessList ¶
type Authentication ¶
type Authentication interface { SignUp(ctx echo.Context) error SignIn(ctx echo.Context) error BasicAuth() echo.MiddlewareFunc Token(ctx echo.Context) error JWT() echo.MiddlewareFunc JWTRest() echo.MiddlewareFunc ACL() echo.MiddlewareFunc LoginWithGithub(ctx echo.Context) error GithubLoginCallbackHandler(ctx echo.Context) error ExpireSessions(ctx echo.Context) error SignOut(ctx echo.Context) error ReadUserWithSession(ctx echo.Context) error RenewAccessToken(ctx echo.Context) error VerifyEmail(ctx echo.Context) error ResetPassword(ctx echo.Context) error ResetForgottenPassword(ctx echo.Context) error ForgotPassword(ctx echo.Context) error Invites(ctx echo.Context) error }
Authentication interface defines the behaviour for container registry and general authentication for the backend
func New ¶
func New( c *config.OpenRegistryConfig, pgStore postgres.PersistentStore, logger telemetry.Logger, ) Authentication
New is the constructor function returns an Authentication implementation
type Claims ¶
type Claims struct { jwt.StandardClaims Type string Access AccessList }
type PlatformClaims ¶
type PlatformClaims struct { OauthPayload *oauth2.Token `json:"oauth2_token,omitempty"` jwt.StandardClaims Type string }
type RefreshClaims ¶
type RefreshClaims struct { ID string jwt.StandardClaims }
type ServiceClaims ¶
type ServiceClaims struct { jwt.StandardClaims Access AccessList }
Click to show internal directories.
Click to hide internal directories.