Adds an OAuth2 identity to the user, so that they can be logged in with that identity. You need to send the OAuth code or the access token to this endpoint. 1. If no access token is provided, it will use your OAuth2 token URL to exchange the given code for an access token. 2. Then it will use the access token (given by you, or received from step 1) to look up the user on your service using the lookup URL, and expects a JSON object in response with an id
property. 3. It will then save that user id
to the user in our db as a new OAuthIdentity. In this example, we call your lookup URL (let's say, https://oauth.provider/user?t=<%= accessToken %>
) with the access token (1234
). The lookup URL returns { id: 'abcd' }
in this case, which we save to the user in our db.
Logs a user in. In this example, we call your lookup URL (let's say, https://oauth.provider/user?t=<%= accessToken %>
) with the access token (1234
). The lookup URL returns { id: 'abcd' }
in this case. We will match this id
with the OAuthIdentity stored in the user information in our db. If everything checks out, the user is logged in and redirected to the home page.
Upserts a user into the clan.
Returns the classroom details for a class code.
Creates a new empty Classroom
.
Upserts a user into the classroom.
Remove a user from the classroom.
Enrolls a user in a course in a classroom. If the course is paid, user must have an active license. User must be a member of the classroom.
Removes an enrolled user from a course in a classroom.
Returns a list of all members stats for the classroom.
Returns a list of all levels played by the user for the classroom.
Returns the playtime stats
Returns the license stats
Creates a User
.
Returns a User
.
Modify name of a User
Returns a list of Classrooms
this user is in (if a student) or owns (if a teacher).
Set the user's hero.
Set the user's aceConfig (the settings for the in-game Ace code editor), such as whether to enable autocomplete.
controls whether autocompletion snippets show up, the default value is true
controls whether things like automatic parenthesis and quote completion happens, the default value is false
Grants a user premium access to the "Home" version up to a certain time.
If the user already has a premium access up to a certain time, this shortens/revokes his/her premium access. If the ends is less than or equal to the current time, it revokes the subscription and sets the end date to be the current time, else it just shortens the subscription.
Grants a user access to the "Classroom" version up to a certain time. Sets their role to "student".
If the user already has access to the "Classroom" version up to a certain time, this shortens/revokes his/her access. If the ends is less than or equal to the current time, it revokes the enrollment and sets the end date to be the current time, else it just shortens the enrollment.