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

fix(selective-disclosure): deprecate the uPort SelectiveDisclosure plugin #1307

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions packages/selective-disclosure/src/action-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,17 @@ import {

/**
* This class adds support for creating
* {@link https://github.com/uport-project/specs/blob/develop/flows/selectivedisclosure.md | Selective Disclosure}
* {@link https://github.com/uport-project/specs/blob/develop/flows/selectivedisclosure.md | uPort Selective Disclosure}
* requests and interpret the responses received.
*
* This implementation of the uPort protocol uses
* {@link https://www.w3.org/TR/vc-data-model/#presentations | W3C Presentation}
* as the response encoding instead of a `shareReq`.
*
* @beta This API may change without a BREAKING CHANGE notice.
*
* @deprecated This plugin is deprecated as it implements a non-standard protocol created for the uPort project. It
* will be removed in a future release.
*/
export class SelectiveDisclosure implements IAgentPlugin {
readonly methods: ISelectiveDisclosure
Expand All @@ -64,7 +67,7 @@ export class SelectiveDisclosure implements IAgentPlugin {
* Creates a Selective disclosure request, encoded as a JWT.
*
* @remarks See
* {@link https://github.com/uport-project/specs/blob/develop/flows/selectivedisclosure.md | Selective Disclosure}
* {@link https://github.com/uport-project/specs/blob/develop/flows/selectivedisclosure.md | uPort Selective Disclosure}
*
* @param args - The param object with the properties necessary to create the request. See
* {@link ISelectiveDisclosureRequest}
Expand Down Expand Up @@ -187,7 +190,7 @@ export class SelectiveDisclosure implements IAgentPlugin {

/**
* Validates a
* {@link https://github.com/uport-project/specs/blob/develop/flows/selectivedisclosure.md | Selective Disclosure response} encoded as a `Presentation`
* {@link https://github.com/uport-project/specs/blob/develop/flows/selectivedisclosure.md | uPort Selective Disclosure response} encoded as a `Presentation`
*
* @param args - Contains the request and the response `Presentation` that needs to be checked.
* @param context - *RESERVED* This is filled by the framework when the method is called.
Expand Down
7 changes: 6 additions & 1 deletion packages/selective-disclosure/src/message-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import { v4 as uuidv4 } from 'uuid'

import Debug from 'debug'
import { asArray, computeEntryHash } from '@veramo/utils'

const debug = Debug('veramo:selective-disclosure:message-handler')

/**
* Identifies a {@link @veramo/core-types#IMessage} that represents a Selective Disclosure Request
*
* @remarks See {@link https://github.com/uport-project/specs/blob/develop/messages/sharereq.md | Selective Disclosure Request}
* @remarks See
* {@link https://github.com/uport-project/specs/blob/develop/messages/sharereq.md | uPort Selective Disclosure Request}
* @beta This API may change without a BREAKING CHANGE notice.
*/
export const MessageTypes = {
Expand All @@ -21,6 +23,9 @@ export const MessageTypes = {
* into the internal Message representation.
*
* @beta This API may change without a BREAKING CHANGE notice.
*
* @deprecated This plugin is deprecated as it implements a non-standard protocol created for the uPort project. It
* will be removed in a future release.
*/
export class SdrMessageHandler extends AbstractMessageHandler {
async handle(message: Message, context: IAgentContext<IMessageHandler>): Promise<Message> {
Expand Down