パッケージの詳細

@ovh-ux/ovh-reket

ovh294BSD-3-Clause2.1.10

Expose a way to get a predefined Reket instance

readme

ovh-reket

Provides a centralized predefined Reket configuration.

Methods

useReket(enableSsoAuth = true, requestTypes = 'default')

import { useReket } from '@ovh-ux/ovh-reket';

const reketInstance = useReket();
// use your Reket instance
reketInstance.get('/my/url').then((response) => {
  console.log(response);
});

Parameters

enableSsoAuth

Type: boolean - default: true

Configure response error hook to handle ssoAuth. This handle logout and redirection to login page in case of non authenticated user.

requestTypes

Type: array|string - default: 'default'

Configure the instance with predefined request types. Can be an array of objects (see Reket configuration) or a string with value 'default' which set the requests types used within the manager.

ssoAuthHookFn

It's also possible to get the function used to handle ssoAuth redirections. Useful if you need to wrap your response with $q in angularJS for example. This method is used internaly by useReket methods when enableSsoAuth param is true.

import angular from 'angular';
import { useReket, ssoAuthHookFn } from '@ovh-ux/ovh-reket';

angular.service('MyService', ($q) => {
  const reketInstance = useReket();
  const responseErrorHook = (error) => {
    return ssoAuthHookFn(error).catch((hookFnError) => $q.reject(hookFnError));
  };

  reketInstance.config.hooks.response.set(null, responseErrorHook);

  // use your Reket instance
  reketInstance
    .get('/my/url')
    .then((response) => {
      console.log(response);
    })
    .catch((error) => {
      console.log(error);
    })
    .finally(() => {
      console.log('called after then or catch');
    });
});

更新履歴

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

2.1.10 (2025-06-20)

Note: Version bump only for package @ovh-ux/ovh-reket

2.1.9 (2025-06-05)

Note: Version bump only for package @ovh-ux/ovh-reket

2.1.8 (2025-04-30)

Note: Version bump only for package @ovh-ux/ovh-reket

2.1.7 (2024-11-28)

Note: Version bump only for package @ovh-ux/ovh-reket

2.1.6 (2024-10-30)

Note: Version bump only for package @ovh-ux/ovh-reket

2.1.5 (2024-10-24)

Note: Version bump only for package @ovh-ux/ovh-reket

2.1.4 (2024-10-24)

Note: Version bump only for package @ovh-ux/ovh-reket

2.1.3 (2024-10-24)

Note: Version bump only for package @ovh-ux/ovh-reket

2.1.2 (2024-08-08)

Note: Version bump only for package @ovh-ux/ovh-reket

2.1.1 (2023-12-05)

Note: Version bump only for package @ovh-ux/ovh-reket

2.1.0 (2023-11-21)

Features

  • migrate from vuepress to vitepress (6968c85)

2.0.1 (2023-09-07)

Note: Version bump only for package @ovh-ux/ovh-reket

2.0.0 (2023-06-12)

Features

  • generator: add generator vitejs react v1 (#9186) (c911ee6)

BREAKING CHANGES

  • generator: rename useShellClient into initShellClient

1.0.2 (2023-01-19)

Note: Version bump only for package @ovh-ux/ovh-reket

1.0.1 (2022-11-29)

Note: Version bump only for package @ovh-ux/ovh-reket

1.0.0 (2022-07-27)

Features

  • ovh-reket: remove APIv7 configuration (14e250f)

BREAKING CHANGES

  • ovh-reket: remove v7 API configuration

0.1.1 (2022-03-04)

Bug Fixes

  • dev-deps: update @ovh-ux/component-rollup-config to v12.0. (8145cd4)

0.1.0 (2022-02-23)

Features

  • reket: export redirection functions (55eef82)

0.0.2 (2021-10-26)

Bug Fixes

  • dev-deps: upgrade @ovh-ux/component-rollup-config to v11.0.0 (3ae659b)

0.0.1 (2021-10-04)

Bug Fixes

  • ovh-reket: telecom auth url (3e5de22)