New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@logto/core-kit

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@logto/core-kit - npm Package Compare versions

Comparing version 2.5.2 to 2.5.3

21

lib/openid.d.ts

@@ -0,1 +1,2 @@

import { z } from 'zod';
/** Scopes that reserved by Logto, which will be added to the auth request automatically. */

@@ -15,4 +16,22 @@ export declare enum ReservedScope {

}
export type UserClaim = 'name' | 'given_name' | 'family_name' | 'middle_name' | 'nickname' | 'preferred_username' | 'profile' | 'picture' | 'website' | 'email' | 'email_verified' | 'gender' | 'birthdate' | 'zoneinfo' | 'locale' | 'phone_number' | 'phone_number_verified' | 'address' | 'updated_at' | 'username' | 'roles' | 'organizations' | 'organization_data' | 'organization_roles' | 'custom_data' | 'identities' | 'sso_identities' | 'created_at';
/**
* A comprehensive list of all available user claims that can be used in SAML applications.
* This array serves two purposes:
* 1. Acts as a single source of truth for all possible `UserClaim` values
* 2. Provides a runtime accessible list of all available claims
*
* Previously, `UserClaim` type was defined directly as a union type. Now, we define this array first
* and derive the `UserClaim` type from it using Zod. This approach maintains type safety while also
* making the complete list of claims available at runtime.
*
* Note: This array must include ALL possible values from `UserClaim` type.
* TypeScript will throw error if any value is missing.
*/
export declare const userClaimsList: readonly ["name", "given_name", "family_name", "middle_name", "nickname", "preferred_username", "profile", "picture", "website", "email", "email_verified", "gender", "birthdate", "zoneinfo", "locale", "phone_number", "phone_number_verified", "address", "updated_at", "username", "roles", "organizations", "organization_data", "organization_roles", "custom_data", "identities", "sso_identities", "created_at"];
/**
* Zod guard for `UserClaim` type, using `userClaimsList` as the single source of truth
*/
export declare const userClaimGuard: z.ZodEnum<["name", "given_name", "family_name", "middle_name", "nickname", "preferred_username", "profile", "picture", "website", "email", "email_verified", "gender", "birthdate", "zoneinfo", "locale", "phone_number", "phone_number_verified", "address", "updated_at", "username", "roles", "organizations", "organization_data", "organization_roles", "custom_data", "identities", "sso_identities", "created_at"]>;
export type UserClaim = z.infer<typeof userClaimGuard>;
/**
* Scopes for ID Token and Userinfo Endpoint.

@@ -19,0 +38,0 @@ */

@@ -0,1 +1,2 @@

import { z } from 'zod';
/** Scopes that reserved by Logto, which will be added to the auth request automatically. */

@@ -18,2 +19,51 @@ export var ReservedScope;

/**
* A comprehensive list of all available user claims that can be used in SAML applications.
* This array serves two purposes:
* 1. Acts as a single source of truth for all possible `UserClaim` values
* 2. Provides a runtime accessible list of all available claims
*
* Previously, `UserClaim` type was defined directly as a union type. Now, we define this array first
* and derive the `UserClaim` type from it using Zod. This approach maintains type safety while also
* making the complete list of claims available at runtime.
*
* Note: This array must include ALL possible values from `UserClaim` type.
* TypeScript will throw error if any value is missing.
*/
export const userClaimsList = [
// OIDC standard claims
'name',
'given_name',
'family_name',
'middle_name',
'nickname',
'preferred_username',
'profile',
'picture',
'website',
'email',
'email_verified',
'gender',
'birthdate',
'zoneinfo',
'locale',
'phone_number',
'phone_number_verified',
'address',
'updated_at',
// Custom claims
'username',
'roles',
'organizations',
'organization_data',
'organization_roles',
'custom_data',
'identities',
'sso_identities',
'created_at',
];
/**
* Zod guard for `UserClaim` type, using `userClaimsList` as the single source of truth
*/
export const userClaimGuard = z.enum(userClaimsList);
/**
* Scopes for ID Token and Userinfo Endpoint.

@@ -20,0 +70,0 @@ */

4

package.json
{
"name": "@logto/core-kit",
"version": "2.5.2",
"version": "2.5.3",
"author": "Silverhand Inc. <contact@silverhand.io>",

@@ -37,3 +37,3 @@ "homepage": "https://github.com/logto-io/toolkit#readme",

"@logto/language-kit": "^1.1.0",
"@logto/shared": "^3.1.0",
"@logto/shared": "^3.1.3",
"@silverhand/essentials": "^2.9.1",

@@ -40,0 +40,0 @@ "color": "^4.2.3"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc