0.1.0 • Published 2 years ago
studentsso v0.1.0
StudentSSO
StudentSSO's offical node.js package
Install
npm i studentsso
# or
yarn add studentsso
Docs
login: function (instance, provider, data)
Logs into a service provider using a user's credentals
Returns:
object
— An object containing a name, email, and schoolExample:
sso.login("studentsso.blobby.me", "demo", { user: "John Doe", pass: "doejohn", district: "School", });
* **Exceptions:** — error if all values are not set.
### `getProvider: function (instance, provider)`
Fetches infomation about a service provider
* **Parameters:**
* `instance` — `string` — - An instance URL of StudentSSO (required)
* `provider` — `string` — - Which provider you would like to you (required)
* **Returns:** `object` — An object about a service provider.
* **Example:**
```js
sso.getProvider("studentsso.blobby.me", "demo");
- Exceptions: — error if all values are not set.
getDistricts: function (instance, provider, q)
Searches instances from a service provider.
- Parameters:
instance
—string
— - An instance URL of StudentSSOprovider
—string
— - Which provider you would like to youquery
—string
— - A query to search for.
- Returns:
object
— An object about a service provider. Normally used for the "district" option when logging in or fetching data
- Example: *
sso.getDistricts("studentsso.blobby.me", "demo", "School District");
- Exceptions: — error if all values are not set.
0.1.0
2 years ago