UNPKG

baasic-sdk-javascript

Version:

JavaScript SDK provides core functionality for building web and mobile applications on [Baasic](http://www.baasic.com/).

36 lines (35 loc) 1.9 kB
/** * @module loginSocialRoute * @description Baasic Login Social Route Definition provides Baasic route templates which can be expanded to Baasic REST URIs. Various services can use Baasic Login Social Route Definition to obtain needed routes while other routes will be obtained through HAL. By convention, all route services use the same function names as their corresponding services. */ import { BaseRoute } from '../../common'; import { IAppOptions } from '../../core/contracts'; export declare class LoginSocialRoute extends BaseRoute { protected appOptions: IAppOptions; /** * Social login get route with route and query parameters. **/ getRoute: string; /** * Social login post route with route and query parameters. **/ postRoute: string; constructor(appOptions: IAppOptions); /** * Parses get social login route which can be expanded with additional items. Supported items are: * - `provider` - Provider name or Id for which the login URL should be generated. * - `returnUrl` - Redirect Uri for the provider which will be used when the user is redirected back to the application. * @method * @param provider Provider name or id for which the login URL should be generated. * @param returnUrl Redirect Uri for the provider which will be used when the user is redirected back to the application. * @example loginSocialRoute.get({ provider : '<provider>', returnUrl: '<returnUrl>' }); **/ get(provider: string, returnUrl: string): any; /** * Parses post social login route which can be expanded with additional items. Supported items are: * - `provider` - Provider name or Id being used to login with. * @method * @example loginSocialClient.post({ provider : '<provider>' }); **/ post(provider: string, options?: any): any; }