Skip to content

Commit

Permalink
fix(selective-disclosure): deprecate the uPort SelectiveDisclosure pl…
Browse files Browse the repository at this point in the history
…ugin (#1307)
  • Loading branch information
mirceanis authored Jan 25, 2024
1 parent 65869c1 commit 71e313f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
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

0 comments on commit 71e313f

Please sign in to comment.