@23blocks/block-authentication 6.2.0 → 6.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +256 -2
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/lib/authentication.block.d.ts +14 -0
- package/dist/src/lib/authentication.block.d.ts.map +1 -1
- package/dist/src/lib/services/index.d.ts +2 -0
- package/dist/src/lib/services/index.d.ts.map +1 -1
- package/dist/src/lib/services/jwks.service.d.ts +58 -0
- package/dist/src/lib/services/jwks.service.d.ts.map +1 -0
- package/dist/src/lib/services/oidc.service.d.ts +58 -0
- package/dist/src/lib/services/oidc.service.d.ts.map +1 -0
- package/dist/src/lib/types/index.d.ts +2 -0
- package/dist/src/lib/types/index.d.ts.map +1 -1
- package/dist/src/lib/types/jwks.d.ts +46 -0
- package/dist/src/lib/types/jwks.d.ts.map +1 -0
- package/dist/src/lib/types/oidc.d.ts +94 -0
- package/dist/src/lib/types/oidc.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2813,6 +2813,255 @@ const tenantUserMapper = {
|
|
|
2813
2813
|
};
|
|
2814
2814
|
}
|
|
2815
2815
|
|
|
2816
|
+
/**
|
|
2817
|
+
* Create the JWKS service
|
|
2818
|
+
*/ function createJwksService(transport) {
|
|
2819
|
+
return {
|
|
2820
|
+
async getJwks () {
|
|
2821
|
+
const response = await transport.get('/.well-known/jwks.json');
|
|
2822
|
+
return {
|
|
2823
|
+
keys: response.keys.map((key)=>({
|
|
2824
|
+
kty: key.kty,
|
|
2825
|
+
use: key.use,
|
|
2826
|
+
key_ops: key.key_ops,
|
|
2827
|
+
alg: key.alg,
|
|
2828
|
+
kid: key.kid,
|
|
2829
|
+
x5u: key.x5u,
|
|
2830
|
+
x5c: key.x5c,
|
|
2831
|
+
x5t: key.x5t,
|
|
2832
|
+
'x5t#S256': key['x5t#S256'],
|
|
2833
|
+
n: key.n,
|
|
2834
|
+
e: key.e,
|
|
2835
|
+
crv: key.crv,
|
|
2836
|
+
x: key.x,
|
|
2837
|
+
y: key.y
|
|
2838
|
+
}))
|
|
2839
|
+
};
|
|
2840
|
+
},
|
|
2841
|
+
async getKey (kid) {
|
|
2842
|
+
const jwks = await this.getJwks();
|
|
2843
|
+
var _jwks_keys_find;
|
|
2844
|
+
return (_jwks_keys_find = jwks.keys.find((key)=>key.kid === kid)) != null ? _jwks_keys_find : null;
|
|
2845
|
+
}
|
|
2846
|
+
};
|
|
2847
|
+
}
|
|
2848
|
+
/**
|
|
2849
|
+
* Create the Admin RSA Keys service
|
|
2850
|
+
*/ function createAdminRsaKeysService(transport) {
|
|
2851
|
+
return {
|
|
2852
|
+
async list () {
|
|
2853
|
+
const response = await transport.get('/admin/rsa_keys');
|
|
2854
|
+
return response.data.map((item)=>({
|
|
2855
|
+
id: item.id,
|
|
2856
|
+
kid: item.attributes.kid,
|
|
2857
|
+
algorithm: item.attributes.algorithm,
|
|
2858
|
+
createdAt: new Date(item.attributes.created_at),
|
|
2859
|
+
expiresAt: item.attributes.expires_at ? new Date(item.attributes.expires_at) : undefined,
|
|
2860
|
+
isActive: item.attributes.is_active,
|
|
2861
|
+
publicKey: item.attributes.public_key
|
|
2862
|
+
}));
|
|
2863
|
+
},
|
|
2864
|
+
async get (keyId) {
|
|
2865
|
+
const response = await transport.get(`/admin/rsa_keys/${keyId}`);
|
|
2866
|
+
return {
|
|
2867
|
+
id: response.data.id,
|
|
2868
|
+
kid: response.data.attributes.kid,
|
|
2869
|
+
algorithm: response.data.attributes.algorithm,
|
|
2870
|
+
createdAt: new Date(response.data.attributes.created_at),
|
|
2871
|
+
expiresAt: response.data.attributes.expires_at ? new Date(response.data.attributes.expires_at) : undefined,
|
|
2872
|
+
isActive: response.data.attributes.is_active,
|
|
2873
|
+
publicKey: response.data.attributes.public_key
|
|
2874
|
+
};
|
|
2875
|
+
},
|
|
2876
|
+
async create (request) {
|
|
2877
|
+
const response = await transport.post('/admin/rsa_keys', {
|
|
2878
|
+
rsa_key: {
|
|
2879
|
+
algorithm: request.algorithm,
|
|
2880
|
+
expires_at: request.expiresAt
|
|
2881
|
+
}
|
|
2882
|
+
});
|
|
2883
|
+
return {
|
|
2884
|
+
id: response.data.id,
|
|
2885
|
+
kid: response.data.attributes.kid,
|
|
2886
|
+
algorithm: response.data.attributes.algorithm,
|
|
2887
|
+
createdAt: new Date(response.data.attributes.created_at),
|
|
2888
|
+
expiresAt: response.data.attributes.expires_at ? new Date(response.data.attributes.expires_at) : undefined,
|
|
2889
|
+
isActive: response.data.attributes.is_active,
|
|
2890
|
+
publicKey: response.data.attributes.public_key
|
|
2891
|
+
};
|
|
2892
|
+
},
|
|
2893
|
+
async rotate (request) {
|
|
2894
|
+
const response = await transport.post('/admin/rsa_keys/rotate', {
|
|
2895
|
+
rsa_key: {
|
|
2896
|
+
algorithm: request.algorithm,
|
|
2897
|
+
expires_at: request.expiresAt
|
|
2898
|
+
}
|
|
2899
|
+
});
|
|
2900
|
+
return {
|
|
2901
|
+
id: response.data.id,
|
|
2902
|
+
kid: response.data.attributes.kid,
|
|
2903
|
+
algorithm: response.data.attributes.algorithm,
|
|
2904
|
+
createdAt: new Date(response.data.attributes.created_at),
|
|
2905
|
+
expiresAt: response.data.attributes.expires_at ? new Date(response.data.attributes.expires_at) : undefined,
|
|
2906
|
+
isActive: response.data.attributes.is_active,
|
|
2907
|
+
publicKey: response.data.attributes.public_key
|
|
2908
|
+
};
|
|
2909
|
+
},
|
|
2910
|
+
async deactivate (keyId) {
|
|
2911
|
+
const response = await transport.put(`/admin/rsa_keys/${keyId}/deactivate`, {});
|
|
2912
|
+
return {
|
|
2913
|
+
id: response.data.id,
|
|
2914
|
+
kid: response.data.attributes.kid,
|
|
2915
|
+
algorithm: response.data.attributes.algorithm,
|
|
2916
|
+
createdAt: new Date(response.data.attributes.created_at),
|
|
2917
|
+
expiresAt: response.data.attributes.expires_at ? new Date(response.data.attributes.expires_at) : undefined,
|
|
2918
|
+
isActive: response.data.attributes.is_active,
|
|
2919
|
+
publicKey: response.data.attributes.public_key
|
|
2920
|
+
};
|
|
2921
|
+
},
|
|
2922
|
+
async delete (keyId) {
|
|
2923
|
+
await transport.delete(`/admin/rsa_keys/${keyId}`);
|
|
2924
|
+
},
|
|
2925
|
+
async getActive () {
|
|
2926
|
+
const keys = await this.list();
|
|
2927
|
+
var _keys_find;
|
|
2928
|
+
return (_keys_find = keys.find((key)=>key.isActive)) != null ? _keys_find : null;
|
|
2929
|
+
}
|
|
2930
|
+
};
|
|
2931
|
+
}
|
|
2932
|
+
|
|
2933
|
+
/**
|
|
2934
|
+
* Create the OIDC service
|
|
2935
|
+
*/ function createOidcService(transport, baseUrl) {
|
|
2936
|
+
return {
|
|
2937
|
+
async getDiscovery () {
|
|
2938
|
+
const response = await transport.get('/.well-known/openid-configuration');
|
|
2939
|
+
return {
|
|
2940
|
+
issuer: response.issuer,
|
|
2941
|
+
authorization_endpoint: response.authorization_endpoint,
|
|
2942
|
+
token_endpoint: response.token_endpoint,
|
|
2943
|
+
userinfo_endpoint: response.userinfo_endpoint,
|
|
2944
|
+
jwks_uri: response.jwks_uri,
|
|
2945
|
+
registration_endpoint: response.registration_endpoint,
|
|
2946
|
+
scopes_supported: response.scopes_supported,
|
|
2947
|
+
response_types_supported: response.response_types_supported,
|
|
2948
|
+
response_modes_supported: response.response_modes_supported,
|
|
2949
|
+
grant_types_supported: response.grant_types_supported,
|
|
2950
|
+
subject_types_supported: response.subject_types_supported,
|
|
2951
|
+
id_token_signing_alg_values_supported: response.id_token_signing_alg_values_supported,
|
|
2952
|
+
claims_supported: response.claims_supported,
|
|
2953
|
+
token_endpoint_auth_methods_supported: response.token_endpoint_auth_methods_supported
|
|
2954
|
+
};
|
|
2955
|
+
},
|
|
2956
|
+
buildAuthorizeUrl (request) {
|
|
2957
|
+
const params = new URLSearchParams();
|
|
2958
|
+
params.set('response_type', request.responseType);
|
|
2959
|
+
params.set('client_id', request.clientId);
|
|
2960
|
+
params.set('redirect_uri', request.redirectUri);
|
|
2961
|
+
params.set('scope', request.scope);
|
|
2962
|
+
if (request.state) params.set('state', request.state);
|
|
2963
|
+
if (request.nonce) params.set('nonce', request.nonce);
|
|
2964
|
+
if (request.codeChallenge) params.set('code_challenge', request.codeChallenge);
|
|
2965
|
+
if (request.codeChallengeMethod) params.set('code_challenge_method', request.codeChallengeMethod);
|
|
2966
|
+
if (request.prompt) params.set('prompt', request.prompt);
|
|
2967
|
+
if (request.maxAge !== undefined) params.set('max_age', String(request.maxAge));
|
|
2968
|
+
if (request.uiLocales) params.set('ui_locales', request.uiLocales);
|
|
2969
|
+
if (request.loginHint) params.set('login_hint', request.loginHint);
|
|
2970
|
+
if (request.acrValues) params.set('acr_values', request.acrValues);
|
|
2971
|
+
const base = '';
|
|
2972
|
+
return `${base}/oauth/authorize?${params.toString()}`;
|
|
2973
|
+
},
|
|
2974
|
+
async exchangeCode (request) {
|
|
2975
|
+
const body = {
|
|
2976
|
+
grant_type: request.grantType,
|
|
2977
|
+
client_id: request.clientId
|
|
2978
|
+
};
|
|
2979
|
+
if (request.code) body.code = request.code;
|
|
2980
|
+
if (request.redirectUri) body.redirect_uri = request.redirectUri;
|
|
2981
|
+
if (request.clientSecret) body.client_secret = request.clientSecret;
|
|
2982
|
+
if (request.refreshToken) body.refresh_token = request.refreshToken;
|
|
2983
|
+
if (request.codeVerifier) body.code_verifier = request.codeVerifier;
|
|
2984
|
+
if (request.scope) body.scope = request.scope;
|
|
2985
|
+
const response = await transport.post('/oauth/token', body);
|
|
2986
|
+
return {
|
|
2987
|
+
access_token: response.access_token,
|
|
2988
|
+
token_type: response.token_type,
|
|
2989
|
+
expires_in: response.expires_in,
|
|
2990
|
+
refresh_token: response.refresh_token,
|
|
2991
|
+
id_token: response.id_token,
|
|
2992
|
+
scope: response.scope
|
|
2993
|
+
};
|
|
2994
|
+
},
|
|
2995
|
+
async refreshToken (refreshToken, clientId) {
|
|
2996
|
+
return this.exchangeCode({
|
|
2997
|
+
grantType: 'refresh_token',
|
|
2998
|
+
refreshToken,
|
|
2999
|
+
clientId
|
|
3000
|
+
});
|
|
3001
|
+
},
|
|
3002
|
+
async getUserInfo (accessToken) {
|
|
3003
|
+
const response = await transport.get('/oauth/userinfo');
|
|
3004
|
+
return {
|
|
3005
|
+
sub: response.sub,
|
|
3006
|
+
name: response.name,
|
|
3007
|
+
given_name: response.given_name,
|
|
3008
|
+
family_name: response.family_name,
|
|
3009
|
+
middle_name: response.middle_name,
|
|
3010
|
+
nickname: response.nickname,
|
|
3011
|
+
preferred_username: response.preferred_username,
|
|
3012
|
+
profile: response.profile,
|
|
3013
|
+
picture: response.picture,
|
|
3014
|
+
website: response.website,
|
|
3015
|
+
email: response.email,
|
|
3016
|
+
email_verified: response.email_verified,
|
|
3017
|
+
gender: response.gender,
|
|
3018
|
+
birthdate: response.birthdate,
|
|
3019
|
+
zoneinfo: response.zoneinfo,
|
|
3020
|
+
locale: response.locale,
|
|
3021
|
+
phone_number: response.phone_number,
|
|
3022
|
+
phone_number_verified: response.phone_number_verified,
|
|
3023
|
+
address: response.address,
|
|
3024
|
+
updated_at: response.updated_at
|
|
3025
|
+
};
|
|
3026
|
+
},
|
|
3027
|
+
async introspect (token) {
|
|
3028
|
+
const response = await transport.post('/oauth/introspect', {
|
|
3029
|
+
token
|
|
3030
|
+
});
|
|
3031
|
+
return {
|
|
3032
|
+
active: response.active,
|
|
3033
|
+
scope: response.scope,
|
|
3034
|
+
clientId: response.client_id,
|
|
3035
|
+
username: response.username,
|
|
3036
|
+
tokenType: response.token_type,
|
|
3037
|
+
exp: response.exp,
|
|
3038
|
+
iat: response.iat,
|
|
3039
|
+
nbf: response.nbf,
|
|
3040
|
+
sub: response.sub,
|
|
3041
|
+
aud: response.aud,
|
|
3042
|
+
iss: response.iss,
|
|
3043
|
+
jti: response.jti
|
|
3044
|
+
};
|
|
3045
|
+
},
|
|
3046
|
+
async revoke (token, tokenTypeHint) {
|
|
3047
|
+
const body = {
|
|
3048
|
+
token
|
|
3049
|
+
};
|
|
3050
|
+
if (tokenTypeHint) body.token_type_hint = tokenTypeHint;
|
|
3051
|
+
await transport.post('/oauth/revoke', body);
|
|
3052
|
+
},
|
|
3053
|
+
endSession (idToken, postLogoutRedirectUri, state) {
|
|
3054
|
+
const params = new URLSearchParams();
|
|
3055
|
+
if (idToken) params.set('id_token_hint', idToken);
|
|
3056
|
+
if (postLogoutRedirectUri) params.set('post_logout_redirect_uri', postLogoutRedirectUri);
|
|
3057
|
+
if (state) params.set('state', state);
|
|
3058
|
+
const base = '';
|
|
3059
|
+
const query = params.toString();
|
|
3060
|
+
return query ? `${base}/oauth/logout?${query}` : `${base}/oauth/logout`;
|
|
3061
|
+
}
|
|
3062
|
+
};
|
|
3063
|
+
}
|
|
3064
|
+
|
|
2816
3065
|
/**
|
|
2817
3066
|
* Create the Authentication block
|
|
2818
3067
|
*
|
|
@@ -2870,7 +3119,10 @@ const tenantUserMapper = {
|
|
|
2870
3119
|
refreshTokens: createRefreshTokensService(transport),
|
|
2871
3120
|
userDevices: createUserDevicesService(transport),
|
|
2872
3121
|
tenantUsers: createTenantUsersService(transport),
|
|
2873
|
-
mailTemplates: createMailTemplatesService(transport)
|
|
3122
|
+
mailTemplates: createMailTemplatesService(transport),
|
|
3123
|
+
jwks: createJwksService(transport),
|
|
3124
|
+
adminRsaKeys: createAdminRsaKeysService(transport),
|
|
3125
|
+
oidc: createOidcService(transport)
|
|
2874
3126
|
};
|
|
2875
3127
|
}
|
|
2876
3128
|
/**
|
|
@@ -2907,7 +3159,9 @@ const tenantUserMapper = {
|
|
|
2907
3159
|
'RefreshToken',
|
|
2908
3160
|
'UserDevice',
|
|
2909
3161
|
'TenantUser',
|
|
2910
|
-
'MailTemplate'
|
|
3162
|
+
'MailTemplate',
|
|
3163
|
+
'RsaKey',
|
|
3164
|
+
'JsonWebKey'
|
|
2911
3165
|
]
|
|
2912
3166
|
};
|
|
2913
3167
|
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { createAuthenticationBlock, type AuthenticationBlock, type AuthenticationBlockConfig, authenticationBlockMetadata, } from './lib/authentication.block.js';
|
|
2
|
-
export { type User, type Role, type Permission, type UserAvatar, type UserProfile, type Company, type CompanyDetail, type CompanyBlock, type CompanyKey, type Tenant, type SignInRequest, type SignInResponse, type SignUpRequest, type SignUpResponse, type PasswordResetRequest, type PasswordUpdateRequest, type TokenValidationResponse, type RefreshTokenRequest, type RefreshTokenResponse, type OAuthSignInRequest, type MagicLinkRequest, type MagicLinkVerifyRequest, type MfaSetupResponse, type MfaVerifyRequest, type InvitationRequest, type AcceptInvitationRequest, type ResendConfirmationRequest, type ValidateEmailRequest, type ValidateEmailResponse, type ValidateDocumentRequest, type ValidateDocumentResponse, type AuthHeaders, type ApiKey, type ApiKeyWithSecret, type CreateApiKeyRequest, type UpdateApiKeyRequest, type RevokeApiKeyRequest, type MfaSetupResponseFull, type MfaEnableRequest, type MfaDisableRequest, type MfaVerifyRequestFull, type MfaStatusResponse, type MfaVerificationResponse, type MfaOperationResponse, type OAuthSocialLoginRequest, type TenantLoginRequest, type TokenIntrospectionResponse, type TokenRevokeRequest, type TokenRevokeAllRequest, type TokenRevokeResponse, type TenantContextCreateRequest, type TenantInfo, type TenantContextResponse, type TenantContextRevokeRequest, type TenantContextAuditEntry, type UserProfileFull, type ProfileRequest, type UpdateEmailRequest, type UserDeviceFull, type AddDeviceRequest, type UserSearchRequest, type AddUserSubscriptionRequest, type AccountRecoveryRequest, type AccountRecoveryResponse, type CompleteRecoveryRequest, type UserAvatarFull, type CreateAvatarRequest, type AvatarPresignResponse, type MultipartPresignRequest, type MultipartPresignResponse, type MultipartCompleteRequest, type MultipartCompleteResponse, type TenantUserFull, type CreateTenantUserRequest, type ValidateTenantCodeRequest, type ValidateTenantCodeResponse, type SearchTenantRequest, type UpdateTenantUserOnboardingRequest, type UpdateTenantUserSalesRequest, type ResendInvitationRequest, } from './lib/types/index.js';
|
|
3
|
-
export { type AuthService, type UsersService, type RolesService, type ApiKeysService, type UpdateUserRequest, type UpdateProfileRequest, type CreateRoleRequest, type UpdateRoleRequest, type ApiKeyUsageStats, type MfaService, type OAuthService, type AvatarsService, type TenantsService, } from './lib/services/index.js';
|
|
2
|
+
export { type User, type Role, type Permission, type UserAvatar, type UserProfile, type Company, type CompanyDetail, type CompanyBlock, type CompanyKey, type Tenant, type SignInRequest, type SignInResponse, type SignUpRequest, type SignUpResponse, type PasswordResetRequest, type PasswordUpdateRequest, type TokenValidationResponse, type RefreshTokenRequest, type RefreshTokenResponse, type OAuthSignInRequest, type MagicLinkRequest, type MagicLinkVerifyRequest, type MfaSetupResponse, type MfaVerifyRequest, type InvitationRequest, type AcceptInvitationRequest, type ResendConfirmationRequest, type ValidateEmailRequest, type ValidateEmailResponse, type ValidateDocumentRequest, type ValidateDocumentResponse, type AuthHeaders, type ApiKey, type ApiKeyWithSecret, type CreateApiKeyRequest, type UpdateApiKeyRequest, type RevokeApiKeyRequest, type MfaSetupResponseFull, type MfaEnableRequest, type MfaDisableRequest, type MfaVerifyRequestFull, type MfaStatusResponse, type MfaVerificationResponse, type MfaOperationResponse, type OAuthSocialLoginRequest, type TenantLoginRequest, type TokenIntrospectionResponse, type TokenRevokeRequest, type TokenRevokeAllRequest, type TokenRevokeResponse, type TenantContextCreateRequest, type TenantInfo, type TenantContextResponse, type TenantContextRevokeRequest, type TenantContextAuditEntry, type UserProfileFull, type ProfileRequest, type UpdateEmailRequest, type UserDeviceFull, type AddDeviceRequest, type UserSearchRequest, type AddUserSubscriptionRequest, type AccountRecoveryRequest, type AccountRecoveryResponse, type CompleteRecoveryRequest, type UserAvatarFull, type CreateAvatarRequest, type AvatarPresignResponse, type MultipartPresignRequest, type MultipartPresignResponse, type MultipartCompleteRequest, type MultipartCompleteResponse, type TenantUserFull, type CreateTenantUserRequest, type ValidateTenantCodeRequest, type ValidateTenantCodeResponse, type SearchTenantRequest, type UpdateTenantUserOnboardingRequest, type UpdateTenantUserSalesRequest, type ResendInvitationRequest, type App, type Block, type Service, type CreateAppRequest, type UpdateAppRequest, type SubscriptionModel, type UserSubscription, type CompanySubscription, type Country, type State, type County, type City, type Currency, type Guest, type MagicLink, type RefreshToken, type UserDevice, type TenantUser, type MailTemplate, type CreateMagicLinkRequest, type RegisterDeviceRequest, type JsonWebKey, type JwksResponse, type RsaKey, type CreateRsaKeyRequest, type RotateRsaKeyRequest, type OidcDiscovery, type OidcAuthorizeRequest, type OidcTokenRequest, type OidcTokenResponse, type OidcUserInfo, } from './lib/types/index.js';
|
|
3
|
+
export { type AuthService, type UsersService, type RolesService, type ApiKeysService, type UpdateUserRequest, type UpdateProfileRequest, type CreateRoleRequest, type UpdateRoleRequest, type ApiKeyUsageStats, type MfaService, type OAuthService, type AvatarsService, type TenantsService, type PermissionsService, type CreatePermissionRequest, type UpdatePermissionRequest, type AppsService, type BlocksService, type ServicesRegistryService, type SubscriptionModelsService, type UserSubscriptionsService, type CompanySubscriptionsService, type SubscribeRequest, type CountriesService, type StatesService, type CountiesService, type CitiesService, type CurrenciesService, type GuestsService, type MagicLinksService, type RefreshTokensService, type UserDevicesService, type TenantUsersService, type MailTemplatesService, type JwksService, type AdminRsaKeysService, type OidcService, } from './lib/services/index.js';
|
|
4
4
|
export { userMapper, roleMapper, permissionMapper, userAvatarMapper, userProfileMapper, companyMapper, companyDetailMapper, companyBlockMapper, companyKeyMapper, tenantMapper, apiKeyMapper, apiKeyWithSecretMapper, } from './lib/mappers/index.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,2BAA2B,GAC5B,MAAM,+BAA+B,CAAC;AAGvC,OAA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gB,EAChB,YAAY,EACZ,YAAY,EACZ,sBAAsB,GACvB,MAAM,wBAAwB,CAAC"}
|
|
@@ -12,6 +12,8 @@ import { type MfaService } from './services/mfa.service.js';
|
|
|
12
12
|
import { type OAuthService } from './services/oauth.service.js';
|
|
13
13
|
import { type AvatarsService } from './services/avatars.service.js';
|
|
14
14
|
import { type TenantsService } from './services/tenants.service.js';
|
|
15
|
+
import { type JwksService, type AdminRsaKeysService } from './services/jwks.service.js';
|
|
16
|
+
import { type OidcService } from './services/oidc.service.js';
|
|
15
17
|
/**
|
|
16
18
|
* Configuration for the Authentication block
|
|
17
19
|
*/
|
|
@@ -129,6 +131,18 @@ export interface AuthenticationBlock {
|
|
|
129
131
|
* Mail template management
|
|
130
132
|
*/
|
|
131
133
|
mailTemplates: MailTemplatesService;
|
|
134
|
+
/**
|
|
135
|
+
* JWKS (JSON Web Key Set) operations
|
|
136
|
+
*/
|
|
137
|
+
jwks: JwksService;
|
|
138
|
+
/**
|
|
139
|
+
* Admin RSA key management
|
|
140
|
+
*/
|
|
141
|
+
adminRsaKeys: AdminRsaKeysService;
|
|
142
|
+
/**
|
|
143
|
+
* OpenID Connect operations
|
|
144
|
+
*/
|
|
145
|
+
oidc: OidcService;
|
|
132
146
|
}
|
|
133
147
|
/**
|
|
134
148
|
* Create the Authentication block
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.block.d.ts","sourceRoot":"","sources":["../../../src/lib/authentication.block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAA4B,KAAK,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACt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AChC,mBAAmB,CAgCrB;AAED;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;CAavC,CAAC"}
|
|
@@ -11,4 +11,6 @@ export { createMfaService, type MfaService } from './mfa.service.js';
|
|
|
11
11
|
export { createOAuthService, type OAuthService } from './oauth.service.js';
|
|
12
12
|
export { createAvatarsService, type AvatarsService } from './avatars.service.js';
|
|
13
13
|
export { createTenantsService, type TenantsService } from './tenants.service.js';
|
|
14
|
+
export { createJwksService, createAdminRsaKeysService, type JwksService, type AdminRsaKeysService, } from './jwks.service.js';
|
|
15
|
+
export { createOidcService, type OidcService } from './oidc.service.js';
|
|
14
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9H,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC3H,OAAO,EAAE,wBAAwB,EAAE,KAAK,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,KAAK,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACzJ,OAAO,EAAE,oBAAoB,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzG,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,6BAA6B,EAC7B,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,uBAAuB,GAC7B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,+BAA+B,EAC/B,8BAA8B,EAC9B,iCAAiC,EACjC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EAAE,MAAM,sBAAsB,CAAC;AAGjF,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,KAAK,WAAW,EAChB,KAAK,mBAAmB,GACzB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Transport } from '@23blocks/contracts';
|
|
2
|
+
import type { JsonWebKey, JwksResponse, RsaKey, CreateRsaKeyRequest, RotateRsaKeyRequest } from '../types/jwks.js';
|
|
3
|
+
/**
|
|
4
|
+
* JWKS Service Interface - JSON Web Key Set operations
|
|
5
|
+
*/
|
|
6
|
+
export interface JwksService {
|
|
7
|
+
/**
|
|
8
|
+
* Get the public JWKS (JSON Web Key Set)
|
|
9
|
+
* Typically accessed at /.well-known/jwks.json
|
|
10
|
+
*/
|
|
11
|
+
getJwks(): Promise<JwksResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Get a specific JSON Web Key by key ID
|
|
14
|
+
*/
|
|
15
|
+
getKey(kid: string): Promise<JsonWebKey | null>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Admin RSA Keys Service Interface - Key management for administrators
|
|
19
|
+
*/
|
|
20
|
+
export interface AdminRsaKeysService {
|
|
21
|
+
/**
|
|
22
|
+
* List all RSA keys
|
|
23
|
+
*/
|
|
24
|
+
list(): Promise<RsaKey[]>;
|
|
25
|
+
/**
|
|
26
|
+
* Get a specific RSA key by ID
|
|
27
|
+
*/
|
|
28
|
+
get(keyId: string): Promise<RsaKey>;
|
|
29
|
+
/**
|
|
30
|
+
* Create a new RSA key
|
|
31
|
+
*/
|
|
32
|
+
create(request: CreateRsaKeyRequest): Promise<RsaKey>;
|
|
33
|
+
/**
|
|
34
|
+
* Rotate RSA keys (create new key and deactivate old ones)
|
|
35
|
+
*/
|
|
36
|
+
rotate(request: RotateRsaKeyRequest): Promise<RsaKey>;
|
|
37
|
+
/**
|
|
38
|
+
* Deactivate an RSA key
|
|
39
|
+
*/
|
|
40
|
+
deactivate(keyId: string): Promise<RsaKey>;
|
|
41
|
+
/**
|
|
42
|
+
* Delete an RSA key
|
|
43
|
+
*/
|
|
44
|
+
delete(keyId: string): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Get the currently active RSA key
|
|
47
|
+
*/
|
|
48
|
+
getActive(): Promise<RsaKey | null>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Create the JWKS service
|
|
52
|
+
*/
|
|
53
|
+
export declare function createJwksService(transport: Transport): JwksService;
|
|
54
|
+
/**
|
|
55
|
+
* Create the Admin RSA Keys service
|
|
56
|
+
*/
|
|
57
|
+
export declare function createAdminRsaKeysService(transport: Transport): AdminRsaKeysService;
|
|
58
|
+
//# sourceMappingURL=jwks.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwks.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/jwks.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,MAAM,EACN,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IAEjC;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE1B;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEpC;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEtD;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEtD;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE3C;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACrC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW,CA+CnE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,SAAS,GAAG,mBAAmB,CAoKnF"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Transport } from '@23blocks/contracts';
|
|
2
|
+
import type { OidcDiscovery, OidcAuthorizeRequest, OidcTokenRequest, OidcTokenResponse, OidcUserInfo } from '../types/oidc.js';
|
|
3
|
+
/**
|
|
4
|
+
* OIDC Service Interface - OpenID Connect operations
|
|
5
|
+
*/
|
|
6
|
+
export interface OidcService {
|
|
7
|
+
/**
|
|
8
|
+
* Get the OpenID Connect discovery document
|
|
9
|
+
* Typically accessed at /.well-known/openid-configuration
|
|
10
|
+
*/
|
|
11
|
+
getDiscovery(): Promise<OidcDiscovery>;
|
|
12
|
+
/**
|
|
13
|
+
* Build the authorization URL for redirect-based authentication
|
|
14
|
+
*/
|
|
15
|
+
buildAuthorizeUrl(request: OidcAuthorizeRequest): string;
|
|
16
|
+
/**
|
|
17
|
+
* Exchange authorization code for tokens
|
|
18
|
+
*/
|
|
19
|
+
exchangeCode(request: OidcTokenRequest): Promise<OidcTokenResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Refresh an access token using a refresh token
|
|
22
|
+
*/
|
|
23
|
+
refreshToken(refreshToken: string, clientId: string): Promise<OidcTokenResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Get user info from the userinfo endpoint
|
|
26
|
+
*/
|
|
27
|
+
getUserInfo(accessToken?: string): Promise<OidcUserInfo>;
|
|
28
|
+
/**
|
|
29
|
+
* Introspect a token (check if valid and get claims)
|
|
30
|
+
*/
|
|
31
|
+
introspect(token: string): Promise<{
|
|
32
|
+
active: boolean;
|
|
33
|
+
scope?: string;
|
|
34
|
+
clientId?: string;
|
|
35
|
+
username?: string;
|
|
36
|
+
tokenType?: string;
|
|
37
|
+
exp?: number;
|
|
38
|
+
iat?: number;
|
|
39
|
+
nbf?: number;
|
|
40
|
+
sub?: string;
|
|
41
|
+
aud?: string | string[];
|
|
42
|
+
iss?: string;
|
|
43
|
+
jti?: string;
|
|
44
|
+
}>;
|
|
45
|
+
/**
|
|
46
|
+
* Revoke a token
|
|
47
|
+
*/
|
|
48
|
+
revoke(token: string, tokenTypeHint?: 'access_token' | 'refresh_token'): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* End the session (logout)
|
|
51
|
+
*/
|
|
52
|
+
endSession(idToken?: string, postLogoutRedirectUri?: string, state?: string): string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Create the OIDC service
|
|
56
|
+
*/
|
|
57
|
+
export declare function createOidcService(transport: Transport, baseUrl?: string): OidcService;
|
|
58
|
+
//# sourceMappingURL=oidc.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oidc.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/oidc.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACb,MAAM,kBAAkB,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,WAAW;IA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AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CA6NrF"}
|
|
@@ -10,4 +10,6 @@ export { type MfaSetupResponse as MfaSetupResponseFull, type MfaEnableRequest, t
|
|
|
10
10
|
export { type OAuthSocialLoginRequest, type TenantLoginRequest, type TokenIntrospectionResponse, type TokenRevokeRequest, type TokenRevokeAllRequest, type TokenRevokeResponse, type TenantContextCreateRequest, type TenantInfo, type TenantContextResponse, type TenantContextRevokeRequest, type TenantContextAuditEntry, } from './oauth.js';
|
|
11
11
|
export { type UserProfile as UserProfileFull, type ProfileRequest, type UpdateEmailRequest, type UserDevice as UserDeviceFull, type AddDeviceRequest, type UserSearchRequest, type AddUserSubscriptionRequest, type AccountRecoveryRequest, type AccountRecoveryResponse, type CompleteRecoveryRequest, type UserAvatar as UserAvatarFull, type CreateAvatarRequest, type AvatarPresignResponse, type MultipartPresignRequest, type MultipartPresignResponse, type MultipartCompleteRequest, type MultipartCompleteResponse, } from './user-extended.js';
|
|
12
12
|
export { type TenantUser as TenantUserFull, type CreateTenantUserRequest, type ValidateTenantCodeRequest, type ValidateTenantCodeResponse, type SearchTenantRequest, type UpdateTenantUserOnboardingRequest, type UpdateTenantUserSalesRequest, type ResendInvitationRequest, } from './tenant.js';
|
|
13
|
+
export { type JsonWebKey, type JwksResponse, type RsaKey, type CreateRsaKeyRequest, type RotateRsaKeyRequest, } from './jwks.js';
|
|
14
|
+
export { type OidcDiscovery, type OidcAuthorizeRequest, type OidcTokenRequest, type OidcTokenResponse, type OidcUserInfo, } from './oidc.js';
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,W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AAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,iCAAiC,EACtC,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,GAC7B,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,YAAY,GAClB,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON Web Key (JWK) representation
|
|
3
|
+
*/
|
|
4
|
+
export interface JsonWebKey {
|
|
5
|
+
kty: string;
|
|
6
|
+
use?: string;
|
|
7
|
+
key_ops?: string[];
|
|
8
|
+
alg?: string;
|
|
9
|
+
kid?: string;
|
|
10
|
+
x5u?: string;
|
|
11
|
+
x5c?: string[];
|
|
12
|
+
x5t?: string;
|
|
13
|
+
'x5t#S256'?: string;
|
|
14
|
+
n?: string;
|
|
15
|
+
e?: string;
|
|
16
|
+
crv?: string;
|
|
17
|
+
x?: string;
|
|
18
|
+
y?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* JSON Web Key Set (JWKS) response
|
|
22
|
+
*/
|
|
23
|
+
export interface JwksResponse {
|
|
24
|
+
keys: JsonWebKey[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* RSA Key for admin management
|
|
28
|
+
*/
|
|
29
|
+
export interface RsaKey {
|
|
30
|
+
id: string;
|
|
31
|
+
kid: string;
|
|
32
|
+
algorithm: string;
|
|
33
|
+
createdAt: Date;
|
|
34
|
+
expiresAt?: Date;
|
|
35
|
+
isActive: boolean;
|
|
36
|
+
publicKey: string;
|
|
37
|
+
}
|
|
38
|
+
export interface CreateRsaKeyRequest {
|
|
39
|
+
algorithm?: string;
|
|
40
|
+
expiresAt?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface RotateRsaKeyRequest {
|
|
43
|
+
algorithm?: string;
|
|
44
|
+
expiresAt?: string;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=jwks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwks.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/jwks.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,EAAE,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenID Connect Discovery document
|
|
3
|
+
*/
|
|
4
|
+
export interface OidcDiscovery {
|
|
5
|
+
issuer: string;
|
|
6
|
+
authorization_endpoint: string;
|
|
7
|
+
token_endpoint: string;
|
|
8
|
+
userinfo_endpoint: string;
|
|
9
|
+
jwks_uri: string;
|
|
10
|
+
registration_endpoint?: string;
|
|
11
|
+
scopes_supported: string[];
|
|
12
|
+
response_types_supported: string[];
|
|
13
|
+
response_modes_supported?: string[];
|
|
14
|
+
grant_types_supported?: string[];
|
|
15
|
+
subject_types_supported: string[];
|
|
16
|
+
id_token_signing_alg_values_supported: string[];
|
|
17
|
+
claims_supported?: string[];
|
|
18
|
+
token_endpoint_auth_methods_supported?: string[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* OIDC Authorization request parameters
|
|
22
|
+
*/
|
|
23
|
+
export interface OidcAuthorizeRequest {
|
|
24
|
+
responseType: string;
|
|
25
|
+
clientId: string;
|
|
26
|
+
redirectUri: string;
|
|
27
|
+
scope: string;
|
|
28
|
+
state?: string;
|
|
29
|
+
nonce?: string;
|
|
30
|
+
codeChallenge?: string;
|
|
31
|
+
codeChallengeMethod?: string;
|
|
32
|
+
prompt?: 'none' | 'login' | 'consent' | 'select_account';
|
|
33
|
+
maxAge?: number;
|
|
34
|
+
uiLocales?: string;
|
|
35
|
+
loginHint?: string;
|
|
36
|
+
acrValues?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* OIDC Token request
|
|
40
|
+
*/
|
|
41
|
+
export interface OidcTokenRequest {
|
|
42
|
+
grantType: 'authorization_code' | 'refresh_token' | 'client_credentials';
|
|
43
|
+
code?: string;
|
|
44
|
+
redirectUri?: string;
|
|
45
|
+
clientId: string;
|
|
46
|
+
clientSecret?: string;
|
|
47
|
+
refreshToken?: string;
|
|
48
|
+
codeVerifier?: string;
|
|
49
|
+
scope?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* OIDC Token response
|
|
53
|
+
*/
|
|
54
|
+
export interface OidcTokenResponse {
|
|
55
|
+
access_token: string;
|
|
56
|
+
token_type: string;
|
|
57
|
+
expires_in: number;
|
|
58
|
+
refresh_token?: string;
|
|
59
|
+
id_token?: string;
|
|
60
|
+
scope?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* OIDC UserInfo response
|
|
64
|
+
*/
|
|
65
|
+
export interface OidcUserInfo {
|
|
66
|
+
sub: string;
|
|
67
|
+
name?: string;
|
|
68
|
+
given_name?: string;
|
|
69
|
+
family_name?: string;
|
|
70
|
+
middle_name?: string;
|
|
71
|
+
nickname?: string;
|
|
72
|
+
preferred_username?: string;
|
|
73
|
+
profile?: string;
|
|
74
|
+
picture?: string;
|
|
75
|
+
website?: string;
|
|
76
|
+
email?: string;
|
|
77
|
+
email_verified?: boolean;
|
|
78
|
+
gender?: string;
|
|
79
|
+
birthdate?: string;
|
|
80
|
+
zoneinfo?: string;
|
|
81
|
+
locale?: string;
|
|
82
|
+
phone_number?: string;
|
|
83
|
+
phone_number_verified?: boolean;
|
|
84
|
+
address?: {
|
|
85
|
+
formatted?: string;
|
|
86
|
+
street_address?: string;
|
|
87
|
+
locality?: string;
|
|
88
|
+
region?: string;
|
|
89
|
+
postal_code?: string;
|
|
90
|
+
country?: string;
|
|
91
|
+
};
|
|
92
|
+
updated_at?: number;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=oidc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oidc.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/oidc.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,W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