Documentation
¶
Overview ¶
Package users contains all the API routes involving scoring users. This includes PCRs, as well as enumeration routes that can be used by frontends to create PCR pages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllUsers ¶
GetAllUsers returns all users from all userlists and their up to date passwords for all teams.
@Summary Get all scoring users
@Description Returns every user in every userlist for every team, including current passwords. Shape: {"team": {"userlist": [User]}}.
@Tags users
@Produce json
@Success 200 {object} map[string]map[string][]types.User
@Failure 400 {object} object
@Router /users [get]
func GetUserLists ¶
GetUserLists is a route that returns descriptions of all userlists. Notably it does not actually return any usernames or passwords. This is intended for use to generate an obfuscated PCR form (like CCDC).
func SubmitPCR ¶
SubmitPCR is a POST route for changing a scoring users password.
@Summary Submit a password change request (PCR)
@Description Updates the password for a scoring user in the specified userlist for the specified team.
@Tags users
@Accept json
@Produce json
@Param pcr body PCR true "Password change request"
@Success 200 {object} object
@Failure 400 {object} object
@Failure 500 {object} object
@Failure 501 {object} object
@Router /users [post]
Types ¶
type PCR ¶
type PCR struct {
types.User
UserListName types.UserListName `json:"user_list" example:"local users"`
TeamNum types.TeamNum `json:"team_num" example:"1"`
}
PCR is the JSON object that must be posted to the server to complete a PCR.
type UserListInfo ¶
type UserListInfo struct {
Name types.UserListName `json:"name"`
Domain string `json:"domain"`
NetBIOS string `json:"netbios"`
}
UserListInfo represents a description of a userlist. This can be used by a frontend to create a PCR form that does not exposes usernames/passwords.