Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: accept header #253

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

feat: accept header #253

wants to merge 27 commits into from

Conversation

volodymyr-basiuk
Copy link
Collaborator

No description provided.

src/iden3comm/handlers/auth.ts Outdated Show resolved Hide resolved
@@ -102,6 +102,11 @@ export class JWSPacker implements IPacker {
return MediaType.SignedMessage;
}

/** {@inheritDoc IPacker.getSupportedAlgorithms} */
getSupportedAlgorithms(): AcceptJwsAlgorithms[] {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure it is unique

@volodymyr-basiuk volodymyr-basiuk marked this pull request as ready for review August 25, 2024 19:57
@volodymyr-basiuk volodymyr-basiuk changed the title WIP: feat: accept header feat: accept header Aug 25, 2024
@@ -102,6 +103,38 @@ export class JWSPacker implements IPacker {
return MediaType.SignedMessage;
}

/** {@inheritDoc IPacker.getEnvelop} */
getEnvelop(): string {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getEnvelope()

}

/** {@inheritDoc IPacker.isSupported} */
isSupported(profile: string) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isProfileSupported

volodymyr-basiuk and others added 3 commits September 4, 2024 17:17
feat: add support of  submitZKPResponseV2 and prepareTxArgsSubmit
}

if (!supportedMediaTypes.length) {
throw new Error('no profile meets `access` header requirements');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throw new Error('no packer with profile which meets access header requirements');
Comment

@@ -21,6 +21,21 @@ export class PackageManager implements IPackageManager {
this.packers = new Map<MediaType, IPacker>();
}

/** {@inheritDoc IPackageManager.isSupported} */
isSupported(mediaType: MediaType, profile: string): boolean {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should rename interface method to isProfileSupported too

@@ -174,6 +175,49 @@ export class ZKPPacker implements IPacker {
mediaType(): MediaType {
return MediaType.ZKPMessage;
}

/** {@inheritDoc IPacker.getEnvelope} */
getEnvelope(): string {
Copy link
Collaborator

@vmidyllic vmidyllic Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and in future I guess we will have potentially an array of strings even for one media type, maybe we should return an array of strings and rename methods to getSupportedProfiles()

vmidyllic and others added 6 commits September 19, 2024 10:11
* add logic for removal of the credential with another status

* add possibility to disable publishing of the genesis state
* update profile nonce, so it can be number or string

* 1.19.0

* add validation check
* add spellcheck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants