@@ -8,19 +8,20 @@ import { createAuthorizeUrl } from '@forgerock/sdk-oidc';
88import { Micro } from 'effect' ;
99
1010import type { WellKnownResponse , GetAuthorizationUrlOptions } from '@forgerock/sdk-types' ;
11-
12- import type { AuthorizationError , AuthorizationSuccess } from './authorize.request.types.js' ;
11+ import type {
12+ AuthorizationError ,
13+ AuthorizationSuccess ,
14+ BuildAuthorizationData ,
15+ OptionalAuthorizeOptions ,
16+ } from './authorize.request.types.js' ;
1317import type { OidcConfig } from './config.types.js' ;
1418
15- type BuildAuthorizationData = [ string , GetAuthorizationUrlOptions ] ;
16- export type OptionalAuthorizeOptions = Partial < GetAuthorizationUrlOptions > ;
17-
1819/**
1920 * @function buildAuthorizeOptionsµ
2021 * @description Builds the authorization options for the OIDC client.
2122 * @param {WellKnownResponse } wellknown - The well-known configuration for the OIDC server.
2223 * @param {OptionalAuthorizeOptions } options - Optional parameters for the authorization request.
23- * @returns {Micro.Micro<BuildAuthorizationData, AuthorizeErrorResponse , never> }
24+ * @returns {Micro.Micro<BuildAuthorizationData, AuthorizationError , never> }
2425 */
2526export function buildAuthorizeOptionsµ (
2627 wellknown : WellKnownResponse ,
@@ -50,7 +51,7 @@ export function buildAuthorizeOptionsµ(
5051 * @param {WellKnownResponse } wellknown- The well-known configuration for the OIDC server.
5152 * @param { OidcConfig } config- The OIDC client configuration.
5253 * @param { GetAuthorizationUrlOptions } options- Optional parameters for the authorization request.
53- * @returns { Micro.Micro<never, AuthorizeErrorResponse , never> }
54+ * @returns { Micro.Micro<never, AuthorizationError , never> }
5455 */
5556export function createAuthorizeErrorµ (
5657 res : { error : string ; error_description : string } ,
@@ -121,7 +122,6 @@ export function createAuthorizeUrlµ(
121122export function handleResponseµ (
122123 response : AuthorizationSuccess | AuthorizationError ,
123124 wellknown : WellKnownResponse ,
124- config : OidcConfig ,
125125 options : GetAuthorizationUrlOptions ,
126126) : Micro . Micro < AuthorizationSuccess , AuthorizationError , never > {
127127 if ( 'code' in response ) {
0 commit comments