Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make 'RefreshState' public #1158

Merged
merged 2 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions docs/oidc-client-ts.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,31 @@ export interface RedirectParams {
redirectTarget?: "top" | "self";
}

// @public
export class RefreshState {
constructor(args: {
refresh_token: string;
id_token?: string;
session_state: string | null;
scope?: string;
profile: UserProfile;
state?: unknown;
}, resource?: string | string[]);
readonly data?: unknown;
// (undocumented)
readonly id_token?: string;
// (undocumented)
readonly profile: UserProfile;
// (undocumented)
readonly refresh_token: string;
// (undocumented)
readonly resource?: string | string[];
// (undocumented)
readonly scope?: string;
// (undocumented)
readonly session_state: string | null;
}

// @public (undocumented)
export type RevokeTokensTypes = UserManagerSettings["revokeTokenTypes"];

Expand Down Expand Up @@ -835,8 +860,6 @@ export class User {

// @public (undocumented)
export interface UseRefreshTokenArgs {
// Warning: (ae-forgotten-export) The symbol "RefreshState" needs to be exported by the entry point index.d.ts
//
// (undocumented)
state: RefreshState;
// (undocumented)
Expand Down
2 changes: 1 addition & 1 deletion src/RefreshState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { UserProfile } from "./User";
/**
* Fake state store implementation necessary for validating refresh token requests.
*
* @internal
* @public
*/
export class RefreshState {
/** custom "state", which can be used by a caller to have "data" round tripped */
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type { OidcMetadata } from "./OidcMetadata";
export { SessionMonitor } from "./SessionMonitor";
export type { SessionStatus } from "./SessionStatus";
export type { SigninRequest, SigninRequestArgs } from "./SigninRequest";
export type { RefreshState } from "./RefreshState";
export { SigninResponse } from "./SigninResponse";
export { SigninState } from "./SigninState";
export type { SignoutRequest, SignoutRequestArgs } from "./SignoutRequest";
Expand Down