1.6.0 • Published 2 years ago
@delysium/sso-api v1.6.0
@delysium/sso-api
Interfaces for Delysium SSO api.
Installation
🚨 Please make sure to add this NPM token in your
.npmrc
file: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
.You can do so by running the following command:
echo "//registry.npmjs.org/:_authToken=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" >> .npmrc
npm i @delysium/sso-api
Usage
import {AuthApi, BodyRequest, Empty, Endpoint, LoginRequest, TokenResponse, UserResponse, AuthEmptyRequest} from "@delysium/sso-api"
// Create a new utility class and implement the API interfaces
class AuthSDK implements AuthApi {
async getMe(request: AuthEmptyRequest): Promise<UserResponse> {
const endpoint = Endpoint.ME
return new Promise((resolve, reject) => {
// TODO http call
})
}
async login(req: BodyRequest<LoginRequest>): Promise<TokenResponse> {
const endpoint = Endpoint.LOGIN
return new Promise((resolve, reject) => {
// TODO http call
})
}
async logout(req: AuthEmptyRequest): Promise<Empty> {
const endpoint = Endpoint.LOGOUT
return new Promise((resolve, reject) => {
// TODO http call
})
}
}
1.6.0
2 years ago
1.5.9
3 years ago
1.5.8
3 years ago
1.5.7
3 years ago
1.5.6
3 years ago
1.5.5
3 years ago
1.5.4
3 years ago
1.5.3
3 years ago
1.5.2
3 years ago
1.5.1
3 years ago
1.5.0
3 years ago
1.4.9
3 years ago
1.4.8
3 years ago
1.4.7
3 years ago
1.4.6
3 years ago
1.4.5
3 years ago
1.4.4
3 years ago
1.4.3
3 years ago
1.4.2
3 years ago
1.4.1
3 years ago
1.4.0
3 years ago
1.3.9
3 years ago
1.3.8
3 years ago
1.3.7
3 years ago
1.3.6
3 years ago
1.3.5
3 years ago
1.3.4
3 years ago
1.3.3
3 years ago
1.3.2
3 years ago
1.3.1
3 years ago
1.2.6
3 years ago
1.2.5
3 years ago
1.2.4
3 years ago
1.2.3
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.2.0
3 years ago
1.1.0
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.0
3 years ago