Skip to content

Commit 2071751

Browse files
committed
refactor: renaming oauth config interface
Signed-off-by: Pawel Psztyc <jarrodek@gmail.com>
1 parent 140c1bf commit 2071751

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@advanced-rest-client/oauth",
33
"description": "The OAuth library for the Advanced REST Client",
4-
"version": "0.2.0",
4+
"version": "0.2.1",
55
"license": "Apache-2.0",
66
"main": "index.js",
77
"module": "index.js",

src/OAuth2Authorization.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ProcessingOptions, OAuth2Authorization as OAuth2Config, TokenInfo } from './types';
1+
import { ProcessingOptions, OAuth2Config, TokenInfo } from './types';
22

33
export declare const resolveFunction: unique symbol;
44
export declare const rejectFunction: unique symbol;

src/Utils.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { OAuth2Authorization } from "./types";
1+
import { OAuth2Config } from "./types";
22

33
/**
44
* Checks if the URL has valid scheme for OAuth flow.
@@ -17,7 +17,7 @@ import { OAuth2Authorization } from "./types";
1717
* @param settings authorization settings
1818
* @throws {Error} When settings are not valid
1919
*/
20-
export function sanityCheck(settings: OAuth2Authorization): void;
20+
export function sanityCheck(settings: OAuth2Config): void;
2121

2222
/**
2323
* Generates a random string of characters.

src/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ interface BaseOAuth2Authorization {
239239
/**
240240
* OAuth 2 configuration object used in Advanced REST Client and API Components.
241241
*/
242-
export interface OAuth2Authorization extends BaseOAuth2Authorization {
242+
export interface OAuth2Config extends BaseOAuth2Authorization {
243243
/**
244244
* The grant type of the OAuth 2 flow.
245245
*

test/oauth2/oauth2-client-credentials.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import { OAuth2Authorization } from '../../src/OAuth2Authorization.js';
44

55
// responses are defined in the ./ServerMock.js
66

7-
/** @typedef {import('../../src/types').OAuth2Authorization} OAuth2Settings */
7+
/** @typedef {import('../../src/types').OAuth2Config} OAuth2Config */
88

99
describe('OAuth2', () => {
1010
describe('client credentials grant', () => {
1111
describe('Body delivery method', () => {
12-
const baseConfig = /** @type OAuth2Settings */ (Object.freeze({
12+
const baseConfig = /** @type OAuth2Config */ (Object.freeze({
1313
grantType: 'client_credentials',
1414
clientId: 'auth-code-cid',
1515
clientSecret: 'cc-secret',
@@ -78,7 +78,7 @@ describe('OAuth2', () => {
7878
});
7979

8080
describe('Headers delivery method', () => {
81-
const baseConfig = /** @type OAuth2Settings */ (Object.freeze({
81+
const baseConfig = /** @type OAuth2Config */ (Object.freeze({
8282
grantType: 'client_credentials',
8383
clientId: 'auth-code-cid',
8484
clientSecret: 'cc-secret',

0 commit comments

Comments
 (0)