@sphereon/oid4vci-common
Advanced tools
Comparing version 0.4.1-unstable.277 to 0.4.1-unstable.278
@@ -1,2 +0,2 @@ | ||
import { AssertedUniformCredentialOffer, AuthzFlowType, CredentialOffer, CredentialOfferPayload, Grant, GrantType, OpenId4VCIVersion, UniformCredentialOffer, UniformCredentialOfferPayload, UniformCredentialOfferRequest } from '../types'; | ||
import { AssertedUniformCredentialOffer, AuthzFlowType, CredentialOffer, CredentialOfferPayload, Grant, GrantTypes, OpenId4VCIVersion, UniformCredentialOffer, UniformCredentialOfferPayload, UniformCredentialOfferRequest } from '../types'; | ||
export declare function determineSpecVersionFromURI(uri: string): OpenId4VCIVersion; | ||
@@ -24,3 +24,3 @@ export declare function determineSpecVersionFromScheme(credentialOfferURI: string, openId4VCIVersion: OpenId4VCIVersion): OpenId4VCIVersion; | ||
grants: Grant; | ||
} & Record<never, never>)): GrantType[]; | ||
} & Record<never, never>)): GrantTypes[]; | ||
//# sourceMappingURL=CredentialOfferUtil.d.ts.map |
@@ -281,7 +281,7 @@ "use strict"; | ||
if (grants.authorization_code) { | ||
types.push(types_1.GrantType.AUTHORIZATION_CODE); | ||
types.push(types_1.GrantTypes.AUTHORIZATION_CODE); | ||
} | ||
if (grants['urn:ietf:params:oauth:grant-type:pre-authorized_code'] && | ||
grants['urn:ietf:params:oauth:grant-type:pre-authorized_code']['pre-authorized_code']) { | ||
types.push(types_1.GrantType.PRE_AUTHORIZED_CODE); | ||
types.push(types_1.GrantTypes.PRE_AUTHORIZED_CODE); | ||
} | ||
@@ -288,0 +288,0 @@ } |
@@ -76,13 +76,2 @@ import { ICredentialContextType, IVerifiableCredential, W3CVerifiableCredential } from '@sphereon/ssi-types'; | ||
} | ||
export declare enum GrantType { | ||
AUTHORIZATION_CODE = "authorization_code", | ||
PRE_AUTHORIZED_CODE = "urn:ietf:params:oauth:grant-type:pre-authorized_code", | ||
PASSWORD = "password" | ||
} | ||
export declare enum TokenErrorResponse { | ||
invalid_request = "invalid_request", | ||
invalid_grant = "invalid_grant", | ||
invalid_client = "invalid_client", | ||
invalid_scope = "invalid_scope" | ||
} | ||
export interface ErrorResponse extends Response { | ||
@@ -89,0 +78,0 @@ error: string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.WellKnownEndpoints = exports.PRE_AUTH_CODE_LITERAL = exports.TokenErrorResponse = exports.GrantType = void 0; | ||
/* | ||
export interface CredentialOfferCredentialDefinition { | ||
'@context': ICredentialContextType[]; | ||
types: string[]; | ||
credentialSubject?: IssuerCredentialSubject; | ||
order?: string[]; // An array of claims.display.name values that lists them in the order they should be displayed by the Wallet. | ||
} | ||
*/ | ||
var GrantType; | ||
(function (GrantType) { | ||
GrantType["AUTHORIZATION_CODE"] = "authorization_code"; | ||
GrantType["PRE_AUTHORIZED_CODE"] = "urn:ietf:params:oauth:grant-type:pre-authorized_code"; | ||
GrantType["PASSWORD"] = "password"; | ||
})(GrantType = exports.GrantType || (exports.GrantType = {})); | ||
/* | ||
export interface CommonAccessTokenRequest { | ||
client_id?: string; | ||
code?: string; | ||
code_verifier?: string; | ||
grant_type: GrantType; | ||
'pre-authorized_code'?: string; | ||
redirect_uri?: string; | ||
scope?: string; | ||
user_pin?: string; | ||
} | ||
*/ | ||
var TokenErrorResponse; | ||
(function (TokenErrorResponse) { | ||
TokenErrorResponse["invalid_request"] = "invalid_request"; | ||
TokenErrorResponse["invalid_grant"] = "invalid_grant"; | ||
TokenErrorResponse["invalid_client"] = "invalid_client"; | ||
TokenErrorResponse["invalid_scope"] = "invalid_scope"; | ||
})(TokenErrorResponse = exports.TokenErrorResponse || (exports.TokenErrorResponse = {})); | ||
exports.WellKnownEndpoints = exports.PRE_AUTH_CODE_LITERAL = void 0; | ||
exports.PRE_AUTH_CODE_LITERAL = 'pre-authorized_code'; | ||
@@ -38,0 +5,0 @@ var WellKnownEndpoints; |
@@ -12,2 +12,3 @@ export * from './Authorization.types'; | ||
export * from './StateManager.types'; | ||
export * from './Token.types'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -28,2 +28,3 @@ "use strict"; | ||
__exportStar(require("./StateManager.types"), exports); | ||
__exportStar(require("./Token.types"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -11,3 +11,3 @@ import { | ||
Grant, | ||
GrantType, | ||
GrantTypes, | ||
OpenId4VCIVersion, | ||
@@ -301,3 +301,3 @@ OpenIDResponse, | ||
} & Record<never, never>) | ||
): GrantType[] { | ||
): GrantTypes[] { | ||
let grants: Grant | undefined; | ||
@@ -310,6 +310,6 @@ if ('grants' in offer && offer.grants) { | ||
const types: GrantType[] = []; | ||
const types: GrantTypes[] = []; | ||
if (grants) { | ||
if (grants.authorization_code) { | ||
types.push(GrantType.AUTHORIZATION_CODE); | ||
types.push(GrantTypes.AUTHORIZATION_CODE); | ||
} | ||
@@ -320,3 +320,3 @@ if ( | ||
) { | ||
types.push(GrantType.PRE_AUTHORIZED_CODE); | ||
types.push(GrantTypes.PRE_AUTHORIZED_CODE); | ||
} | ||
@@ -323,0 +323,0 @@ } |
@@ -112,7 +112,3 @@ import { ICredentialContextType, IVerifiableCredential, W3CVerifiableCredential } from '@sphereon/ssi-types'; | ||
export enum GrantType { | ||
AUTHORIZATION_CODE = 'authorization_code', | ||
PRE_AUTHORIZED_CODE = 'urn:ietf:params:oauth:grant-type:pre-authorized_code', | ||
PASSWORD = 'password', | ||
} | ||
// export type GrantType = GrantTypes; | ||
@@ -132,9 +128,2 @@ /* | ||
export enum TokenErrorResponse { | ||
invalid_request = 'invalid_request', | ||
invalid_grant = 'invalid_grant', | ||
invalid_client = 'invalid_client', // this code has been added only in v1_0-11, but I've added this to the common interface. @nklomp is this ok? | ||
invalid_scope = 'invalid_scope', | ||
} | ||
/* | ||
@@ -141,0 +130,0 @@ export interface CommonAccessTokenResponse { |
@@ -12,1 +12,2 @@ export * from './Authorization.types'; | ||
export * from './StateManager.types'; | ||
export * from './Token.types'; |
{ | ||
"name": "@sphereon/oid4vci-common", | ||
"version": "0.4.1-unstable.277+2baf7fa", | ||
"version": "0.4.1-unstable.278+6796a4b", | ||
"description": "OpenID 4 Verifiable Credential Issuance Common Types", | ||
@@ -48,3 +48,3 @@ "source": "lib/index.ts", | ||
}, | ||
"gitHead": "2baf7fa327402f5d41002e126cd8df1e1c225e23" | ||
"gitHead": "6796a4b6457fd2de9c31f3b9c3d8fb3325a52002" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
224318
108
3317