Class: SSOService
services/sso.SSOService
SSO service can be used in the following way:
1. Import the service from our library:
import {SSOService} from "@selfcommunity/api-services";
2. Create a function and put the service inside it!
The async function `SignUp` will return the user registration data. It takes the username and ext_id obj as body params.
async SignUp() {
const data = {username: 'string', ext_id: 'number'};
return await SSOService.SignUp(data);
}
If you need to customize the request, you can add optional config params (`AxiosRequestConfig` type).
1. Declare it(or declare them, it is possible to add multiple params)
const headers = headers: {Authorization: `Bearer ${yourToken}`}
2. Add it inside the brackets and pass it to the function, as shown in the previous example!
Constructors
constructor
• new SSOService(): SSOService
Returns
Methods
SignIn
▸ SignIn(config?
): Promise
<SSOSignInType
>
Parameters
Name | Type |
---|---|
config? | AxiosRequestConfig <any > |
Returns
Promise
<SSOSignInType
>
Defined in
SignUp
▸ SignUp(data
, config?
): Promise
<SSOSignUpType
>
Parameters
Name | Type |
---|---|
data | SSOSignUpParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SSOSignUpType
>