Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@affinidi/affinidi-react-auth

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@affinidi/affinidi-react-auth - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

138

dist/utils/presentation-definitions.d.ts

@@ -8,10 +8,32 @@ export declare const presentationDefinitions: {

purpose: string;
group: string[];
constraints: {
fields: {
fields: ({
path: string[];
purpose: string;
filter: {
type: string;
contains: {
type: string;
pattern: string;
};
pattern?: undefined;
};
} | {
path: string[];
purpose: string;
filter: {
type: string;
contains?: undefined;
pattern?: undefined;
};
} | {
path: string[];
purpose: string;
filter: {
type: string;
pattern: string;
contains?: undefined;
};
}[];
})[];
};

@@ -24,3 +46,3 @@ }[];

rule: string;
count: number;
min: number;
from: string;

@@ -34,8 +56,50 @@ }[];

constraints: {
fields: {
fields: ({
path: string[];
purpose: string;
filter: {
type: string;
contains: {
type: string;
pattern: string;
};
pattern?: undefined;
};
} | {
path: string[];
purpose: string;
filter: {
type: string;
contains?: undefined;
pattern?: undefined;
};
} | {
path: string[];
purpose: string;
filter: {
type: string;
pattern: string;
contains?: undefined;
};
})[];
};
}[];
};
readonly moviePreference: {
id: string;
input_descriptors: {
id: string;
name: string;
purpose: string;
constraints: {
fields: {
path: string[];
purpose: string;
filter: {
type: string;
contains: {
type: string;
pattern: string;
};
};
}[];

@@ -45,3 +109,69 @@ };

};
readonly emailAndHITProfileVC: {
id: string;
submission_requirements: {
rule: string;
min: number;
from: string;
}[];
input_descriptors: ({
id: string;
name: string;
purpose: string;
group: string[];
constraints: {
fields: ({
path: string[];
purpose: string;
filter: {
type: string;
contains: {
type: string;
pattern: string;
};
pattern?: undefined;
};
} | {
path: string[];
purpose: string;
filter: {
type: string;
contains?: undefined;
pattern?: undefined;
};
} | {
path: string[];
purpose: string;
filter: {
type: string;
pattern: string;
contains?: undefined;
};
})[];
};
} | {
id: string;
name: string;
purpose: string;
group: string[];
constraints: {
fields: ({
path: string[];
purpose: string;
filter: {
type: string;
contains: {
type: string;
pattern: string;
};
};
} | {
path: string[];
purpose?: undefined;
filter?: undefined;
})[];
};
})[];
};
};
//# sourceMappingURL=presentation-definitions.d.ts.map

@@ -9,13 +9,33 @@ "use strict";

id: 'email_vc',
name: 'Email VC type',
purpose: 'Check if VC type is correct',
name: 'Email VC',
purpose: 'Check if VC data contains necessary fields',
group: ['A'],
constraints: {
fields: [
{
path: ['$.credentialSchema.id'],
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'array',
contains: {
type: 'string',
pattern: 'Email',
},
},
},
{
path: ['$.credentialSubject.email'],
purpose: 'Check if VC contains email field',
filter: {
type: 'string',
pattern: '^https:\\/\\/schema\\.affinidi\\.com\\/EmailV1-0\\.json$',
},
},
{
path: ['$.issuer'],
purpose: 'Check if VC Issuer is Trusted',
filter: {
type: 'string',
pattern: '^did:key:zQ3shtMGCU89kb2RMknNZcYGUcHW8P6Cq3CoQyvoDs7Qqh33N|^did:elem:EiBb5gyC1mu3t31oYwMsYWg1U2HyNtaVQ0NKn5UkAzB8BQ',
},
},
],

@@ -26,14 +46,314 @@ },

};
const emailAndProfileVC = {
id: 'vp_combined',
const emailAndHITProfileVC = {
id: 'vp_combined_email_user_profile_combined',
submission_requirements: [
{
rule: 'pick',
count: 1,
min: 1,
from: 'A',
},
],
input_descriptors: [
{
id: 'email_vc',
name: 'Email VC',
purpose: 'Check if VC data contains necessary fields',
group: ['A'],
constraints: {
fields: [
{
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'array',
contains: {
type: 'string',
pattern: 'Email',
},
},
},
{
path: ['$.credentialSubject.email'],
purpose: 'Check if VC contains email field',
filter: {
type: 'string',
},
},
{
path: ['$.issuer'],
purpose: 'Check if VC Issuer is Trusted',
filter: {
type: 'string',
pattern: '^did:key:zQ3shtMGCU89kb2RMknNZcYGUcHW8P6Cq3CoQyvoDs7Qqh33N|^did:elem:EiBb5gyC1mu3t31oYwMsYWg1U2HyNtaVQ0NKn5UkAzB8BQ',
},
},
],
},
},
{
id: 'mobile_vc',
name: 'mobile VC',
purpose: 'Check if VC data contains necessary fields',
group: ['A'],
constraints: {
fields: [
{
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'array',
contains: {
type: 'string',
pattern: 'HITPhoneNumber',
},
},
},
{
path: ['$.credentialSubject.phoneNumber'],
purpose: 'phone Number',
filter: {
type: 'string',
},
},
],
},
},
{
id: 'givenname_vc',
name: 'givenname VC',
purpose: 'Check if VC data contains necessary fields',
group: ['A'],
constraints: {
fields: [
{
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'array',
contains: {
type: 'string',
pattern: 'HITGivenName',
},
},
},
{
path: ['$.credentialSubject.givenName'],
purpose: 'given Name',
filter: {
type: 'string',
},
},
],
},
},
{
id: 'familyName',
name: 'familyName VC',
purpose: 'Check if VC data contains necessary fields',
group: ['A'],
constraints: {
fields: [
{
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'array',
contains: {
type: 'string',
pattern: 'HITFamilyName',
},
},
},
{
path: ['$.credentialSubject.familyName'],
purpose: 'family Name',
filter: {
type: 'string',
},
},
],
},
},
{
id: 'middleName',
name: 'middleName VC',
purpose: 'Check if VC data contains necessary fields',
group: ['A'],
constraints: {
fields: [
{
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'array',
contains: {
type: 'string',
pattern: 'HITMiddleName',
},
},
},
{
path: ['$.credentialSubject.middleName'],
purpose: 'middleName',
filter: {
type: 'string',
},
},
],
},
},
{
id: 'nickname',
name: 'nickname',
purpose: 'Check if VC data contains necessary fields',
group: ['A'],
constraints: {
fields: [
{
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'array',
contains: {
type: 'string',
pattern: 'HITNickname',
},
},
},
{
path: ['$.credentialSubject.nickname'],
purpose: 'nickname',
filter: {
type: 'string',
},
},
],
},
},
{
id: 'birthdate',
name: 'birthdate',
purpose: 'Check if VC data contains necessary fields',
group: ['A'],
constraints: {
fields: [
{
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'array',
contains: {
type: 'string',
pattern: 'HITBirthdate',
},
},
},
{
path: ['$.credentialSubject.birthdate'],
purpose: 'birthdate',
filter: {
type: 'string',
},
},
],
},
},
{
id: 'gender',
name: 'gender',
purpose: 'Check if VC data contains necessary fields',
group: ['A'],
constraints: {
fields: [
{
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'array',
contains: {
type: 'string',
pattern: 'HITGender',
},
},
},
{
path: ['$.credentialSubject.gender'],
purpose: 'gender',
filter: {
type: 'string',
},
},
],
},
},
{
id: 'picture',
name: 'picture',
purpose: 'Check if VC data contains necessary fields',
group: ['A'],
constraints: {
fields: [
{
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'array',
contains: {
type: 'string',
pattern: 'HITPicture',
},
},
},
{
path: ['$.credentialSubject.picture'],
purpose: 'picture',
filter: {
type: 'string',
},
},
],
},
},
{
id: 'address',
name: 'address',
purpose: 'Check if VC data contains necessary fields',
group: ['A'],
constraints: {
fields: [
{
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'array',
contains: {
type: 'string',
pattern: 'HITAddress',
},
},
},
{
path: ['$.credentialSubject.formatted'],
},
{
path: ['$.credentialSubject.locality'],
},
{
path: ['$.credentialSubject.postalCode'],
},
{
path: ['$.credentialSubject.country'],
},
],
},
},
],
};
const emailAndProfileVC = {
id: 'vp_combined_email_user_profile_combined',
submission_requirements: [
{
rule: 'pick',
count: 1,
from: 'B',
min: 1,
from: 'A',
},

@@ -43,5 +363,5 @@ ],

{
id: 'github_developer_profile_vc',
name: 'GitHub Developer profile VC type',
purpose: 'To get developer profile VC type',
id: 'email_vc',
name: 'Email VC',
purpose: 'Check if VC data contains necessary fields',
group: ['A'],

@@ -51,8 +371,27 @@ constraints: {

{
path: ['$.credentialSchema.id'],
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'array',
contains: {
type: 'string',
pattern: 'Email',
},
},
},
{
path: ['$.credentialSubject.email'],
purpose: 'Check if VC contains email field',
filter: {
type: 'string',
pattern: '^https:\\/\\/schema\\.affinidi\\.com\\/EmailV1-0\\.json$',
},
},
{
path: ['$.issuer'],
purpose: 'Check if VC Issuer is Trusted',
filter: {
type: 'string',
pattern: '^did:key:zQ3shtMGCU89kb2RMknNZcYGUcHW8P6Cq3CoQyvoDs7Qqh33N|^did:elem:EiBb5gyC1mu3t31oYwMsYWg1U2HyNtaVQ0NKn5UkAzB8BQ',
},
},
],

@@ -62,13 +401,17 @@ },

{
id: 'personal_profile_vc',
name: 'Personal Profile VC type',
purpose: 'To get Personal Profile type',
group: ['B'],
id: 'profile_vc',
name: 'profile VC',
purpose: 'Check if VC data contains necessary fields',
group: ['A'],
constraints: {
fields: [
{
path: ['$.credentialSchema.id'],
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'string',
pattern: '^https:\\/\\/schema\\.affinidi\\.com\\/UserProfileV2-0\\.json$',
type: 'array',
contains: {
type: 'string',
pattern: 'UserProfile',
},
},

@@ -81,6 +424,33 @@ },

};
const moviePreference = {
id: 'vp_token_with_movie_vc',
input_descriptors: [
{
id: 'movie_vc',
name: 'movie VC type',
purpose: 'Check if VC type is correct',
constraints: {
fields: [
{
path: ['$.type'],
purpose: 'Check if VC type is correct',
filter: {
type: 'array',
contains: {
type: 'string',
pattern: 'MoviePreferences',
},
},
},
],
},
},
],
};
exports.presentationDefinitions = {
emailVc,
emailAndProfileVC,
moviePreference,
emailAndHITProfileVC,
};
//# sourceMappingURL=presentation-definitions.js.map

2

package.json
{
"name": "@affinidi/affinidi-react-auth",
"version": "1.0.6",
"version": "1.0.7",
"description": "Affinidi react auth library for creating Affinidi Login Button",

@@ -5,0 +5,0 @@ "author": "affinidi.com",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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