diff --git a/browser/package.json b/browser/package.json index 2aeac2b..9793ffc 100644 --- a/browser/package.json +++ b/browser/package.json @@ -1,6 +1,6 @@ { "name": "@janishutz/oidc-login-sdk-browser", - "version": "1.3.1", + "version": "1.3.2", "description": "SDK to communicate with and log into a backend running express-openid-connect", "homepage": "https://github.com/janishutz/oidc-login-sdk#readme", "bugs": { diff --git a/browser/src/request.ts b/browser/src/request.ts index fe01da8..3683e55 100644 --- a/browser/src/request.ts +++ b/browser/src/request.ts @@ -16,7 +16,7 @@ export class UnownedError extends Error {} * @param authErrorResolution - The mean of authentication error resolution * @returns The reponse */ -const get = async ( url: string, authErrorResolution?: AuthErrorResolution ): Promise => { +export const get = async ( url: string, authErrorResolution?: AuthErrorResolution ): Promise => { return await wrapper( url, { 'credentials': 'include' }, authErrorResolution ); @@ -30,7 +30,7 @@ const get = async ( url: string, authErrorResolution?: AuthErrorResolution ): Pr * @param authErrorResolution - The mean of authentication error resolution * @returns The response */ -const post = async ( url: string, payload: string, mime: string = 'application/json', authErrorResolution?: AuthErrorResolution ): Promise => { +export const post = async ( url: string, payload: string, mime: string = 'application/json', authErrorResolution?: AuthErrorResolution ): Promise => { return await wrapper( url, { 'credentials': 'include', 'body': payload, @@ -47,7 +47,7 @@ const post = async ( url: string, payload: string, mime: string = 'application/j * @param authErrorResolution - The mean of authentication error resolution * @returns The response */ -const deleteRequest = async ( url: string, authErrorResolution?: AuthErrorResolution ): Promise => { +export const deleteRequest = async ( url: string, authErrorResolution?: AuthErrorResolution ): Promise => { return await wrapper( url, { 'credentials': 'include', 'method': 'delete' @@ -58,7 +58,7 @@ const deleteRequest = async ( url: string, authErrorResolution?: AuthErrorResolu * Retrieve the configured backend URL * @returns The URL to the backend */ -const getBackendURL = () => { +export const getBackendURL = () => { return config.get().backendURL; };