Skip to main content

SSO Routes

GET /api/verifyLogin/:hash

Check if a login session for a session hash is in progress.

NameTypeDescription
ParamsidStringhash id to check for active sesion
OutputUserLogged in user.

Sample Output

{
"_id": "mockUser",
"plan_ids": [
{
"$oid": "623659ddb8316b8b54f77815"
},
{
"$oid": "6239587fdaa1f097d40626ba"
}
],
"name": "mockUser",
"email": "mockUser@fakeemail.com",
"affiliation": "STAFF",
"grade": "AE UG Freshman",
"school": "jooby hooby",
"__v": 0
}

GET /api/backdoor/verification/:id

Dev login for a user.

NameTypeDescription
ParamsidStringuser id
OutputUseruser.

Sample Output

{
"_id": "mockUser",
"plan_ids": [
{
"$oid": "623659ddb8316b8b54f77815"
},
{
"$oid": "6239587fdaa1f097d40626ba"
}
],
"name": "mockUser",
"email": "mockUser@fakeemail.com",
"affiliation": "STAFF",
"grade": "AE UG Freshman",
"school": "jooby hooby",
"__v": 0
}

GET /api/login

Redirects to JHU 3rd party login page.

GET /api/metadata

Get route used for 3rd party JHU authentication.

POST /api/login/callback

A callback route called on successful login from JHU 3rd party login page.

NameTypeDescription
UserdisplayNameStringfull user name
JHEDidStringJHED of user
emailStringemail of user
affiliationStringaffiliation of user
gradeNumberyear of user
schoolStringschool of user
OutputUserLogged in user.

Sample Output

{
"_id": "mockUser",
"plan_ids": [
{
"$oid": "623659ddb8316b8b54f77815"
},
{
"$oid": "6239587fdaa1f097d40626ba"
}
],
"name": "mockUser",
"email": "mockUser@fakeemail.com",
"affiliation": "STAFF",
"grade": "AE UG Freshman",
"school": "jooby hooby",
"__v": 0
}

DELETE /api/verifyLogin/:hash

Deleting a login session based on a specific session hash.

NameTypeDescription
ParamshashStringsession hash for session to delete
OutputUseruser with deleted login session

Sample Output

{
"_id": "mockUser",
"plan_ids": [
{
"$oid": "623659ddb8316b8b54f77815"
},
{
"$oid": "6239587fdaa1f097d40626ba"
}
],
"name": "mockUser",
"email": "mockUser@fakeemail.com",
"affiliation": "STAFF",
"grade": "AE UG Freshman",
"school": "jooby hooby",
"__v": 0
}