You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sets the sponsor for the current user (must be authenticated)
POST
{sponsor_token: <256-bit hex string>}
{status: <int>, message: <string>}
The middleware should verify that the user has a valid sponsor set when visiting particular authenticated pages. This can be changed in verify.ts. If the JWT authenticates but does not have a sponsor, return a 403 forbidden. NOTE: the user/sponsor/set endpoint cannot go through the middleware in this case because it must allow the user without a sponsor to access it.
Finally, the following database schemas for Sportal must also be changed:
sponsor: {
name text PRIMARY KEY,
sponsor_key text NOT NULL,
logo_url text NOT NULL
}
user: {
ground_truth_id PRIMARY KEY,
email TEXT UNIQUE NOT NULL,
sponsor_name TEXT REFERENCES sponsor(name)
}
The text was updated successfully, but these errors were encountered:
Endpoints to modify
/user
{email: <string>, password: <string>, sponsorName: <string>, apiKey: <string>}
{status: <int>, message: <string>}
/user/login
{ground_truth_token: <string>}
{jwt: <string>, sponsor_name: <string>, logo_url: <string>}
Endpoints to add
/user/sponsor/set
{sponsor_token: <256-bit hex string>}
{status: <int>, message: <string>}
The middleware should verify that the user has a valid sponsor set when visiting particular authenticated pages. This can be changed in verify.ts. If the JWT authenticates but does not have a sponsor, return a 403 forbidden. NOTE: the user/sponsor/set endpoint cannot go through the middleware in this case because it must allow the user without a sponsor to access it.
Finally, the following database schemas for Sportal must also be changed:
The text was updated successfully, but these errors were encountered: