Skip to content

Commit

Permalink
feat: add from_str_with_namespace to SubjectSyntaxType::from_str
Browse files Browse the repository at this point in the history
  • Loading branch information
nanderstabel committed May 8, 2024
1 parent 4185b47 commit 3faa9b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion oid4vc-core/src/subject_syntax_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ impl FromStr for SubjectSyntaxType {
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"urn:ietf:params:oauth:jwk-thumbprint" => Ok(SubjectSyntaxType::JwkThumbprint),
_ => Ok(SubjectSyntaxType::Did(DidMethod::from_str(s)?)),
_ => Ok(SubjectSyntaxType::Did(
DidMethod::from_str_with_namespace(s).or_else(|_| DidMethod::from_str(s))?,
)),
}
}
}
Expand Down

0 comments on commit 3faa9b1

Please sign in to comment.