Documentation
¶
Index ¶
- func HandleChangePassword(c *gin.Context)
- func HandleCliLogin(c *gin.Context)
- func HandleLogin(ctx *gin.Context)
- func HandleLogout(ctx *gin.Context)
- func HandleRetrieveInitialUserExists(ctx *gin.Context)
- func HandleRetrieveUserPublicKey(ctx *gin.Context)
- func HandleRetriveUserDetails(ctx *gin.Context)
- func HandleSignup(ctx *gin.Context)
- func HandleSubdomainLoginAuthorize(ctx *gin.Context)
- func HandleSubdomainLoginCallback(ctx *gin.Context)
- func HandleUpdateUserDetails(ctx *gin.Context)
- func SetAuthCookie(ctx *gin.Context, token string) error
- func SetSubdomainsAuthCookie(ctx *gin.Context, token string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleChangePassword ¶
TODO: ratelimit? POST /api/v1/auth/change-password change the password of current user
func HandleLogin ¶
login godoc @Summary Login @Schemes @Description Login using email and password @Tags Templates @Accept json @Produce json @Success 204 {object} []models.Workspace @Router /api/v1/templates/:templateId [put]
func HandleLogout ¶
/api/v1/logout delete token and clear cookies
func HandleRetrieveInitialUserExists ¶
TODO: ratelimit GET /api/v1/auth/initial-user-exists retrieve if at least one user exists for the current instance of codebox this api is used to redirect users to signup page to create the first user
func HandleRetrieveUserPublicKey ¶
GET /api/v1/auth/user-ssh-public-key retrieve user's ssh public key
func HandleRetriveUserDetails ¶
GET /api/v1/auth/user-details retrieve details about the current user
func HandleSignup ¶
TODO: ratelimit POST /api/v1/signup check if a user already exists, check if another user with the same email address exists validate password
func HandleUpdateUserDetails ¶
PUT or PATCH /api/v1/auth/user-details update user first and last name
func SetAuthCookie ¶
set authentication cookie
func SetSubdomainsAuthCookie ¶
set authentication cookie for subdomains Note: This cookie uses a different name compared to the main website's authorization cookie. This addresses a scenario where a subdomain (within the codebox server's wildcard domain) might attempt to set a cookie with the same name as the secure codebox server's authorization cookie, which browsers prevent.
Types ¶
This section is empty.