Skip to content

Latest commit

 

History

History
94 lines (68 loc) · 2 KB

Server Common SDK_DidValidator.md

File metadata and controls

94 lines (68 loc) · 2 KB
puppeteer
pdf image
format displayHeaderFooter landscape scale margin
A4
true
false
0.8
top right bottom left
1.2cm
1cm
1cm
1cm
quality fullPage
100
false

Server Common SDK API - DidValidator

  • Date: 2024-09-02
  • Version: v1.0.0
Version Date History
v1.0.0 2024-09-02 Initial

Table of Contents

APIs

1. isValidDid

Description

Validates the format of the given DID string.

Declaration

public static boolean isValidDid(String did)

Parameters

Name Type Description
did String DID string to be verified

Returns

Type Description
boolean true if the DID is valid, otherwise false

Usage

String did = "did:omn:abcdefghijklmn";
boolean isValid = DidValidator.isValidDid(did); // returns true if the DID is valid

2. isValidDidKeyUrl

Description

Verifies the format of the given DID Key URL string.

Declaration

public static boolean isValidDidKeyUrl(String didKeyUrl)

Parameters

Name Type Description
didKeyUrl String DID Key URL string to be verified

Returns

Type Description
boolean true if valid, false otherwise

Usage

String didKeyUrl = "did:omn:raon?version=1#pin";
boolean isValid = DidValidator.isValidDidKeyUrl(didKeyUrl); // returns true if the DID Key URL is valid