Skip to content

Commit

Permalink
feat: Added client metadata #2033
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Oct 23, 2023
1 parent 1a43aae commit a4d2392
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 11 deletions.
48 changes: 48 additions & 0 deletions lib/app/shared/constants/constants_json.dart
Original file line number Diff line number Diff line change
Expand Up @@ -317,4 +317,52 @@ abstract class ConstantsJson {
],
'presentation_definition': <String, dynamic>{},
};

static const clientMetadata = <String, dynamic>{
'authorization_endpoint': 'https://app.altme.io/app/download/authorize',
'scopes_supported': ['openid'],
'response_types_supported': ['vp_token', 'id_token'],
'client_id_schemes_supported': ['redirect_uri', 'did'],
'grant_types_supported': ['authorization_code', 'pre-authorized_code'],
'subject_types_supported': ['public'],
'id_token_signing_alg_values_supported': ['ES256', 'ES256K'],
'request_object_signing_alg_values_supported': [
'ES256',
'ES256K',
],
'request_parameter_supported': true,
'request_uri_parameter_supported': true,
'request_authentication_methods_supported': {
'authorization_endpoint': ['request_object'],
},
'vp_formats_supported': {
'jwt_vp': {
'alg_values_supported': [
'ES256',
'ES256K',
],
},
'jwt_vc': {
'alg_values_supported': [
'ES256',
'ES256K',
],
},
},
'subject_syntax_types_supported': [
'urn:ietf:params:oauth:jwk-thumbprint',
'did:key',
'did:ebsi',
'did:tz',
'did:pkh',
'did:hedera',
'did:key',
'did:polygonid',
'did:ethr',
'did:web',
],
'subject_syntax_types_discriminations': ['did🔑jwk_jcs-pub', 'did:ebsi:v1'],
'subject_trust_frameworks_supported': ['ebsi'],
'id_token_types_supported': ['subject_signed_id_token'],
};
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:convert';

import 'package:altme/app/app.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:altme/l10n/l10n.dart';
Expand Down Expand Up @@ -32,14 +34,27 @@ class Oidc4vcSettingMenuView extends StatelessWidget {
titleAlignment: Alignment.topCenter,
padding: const EdgeInsets.symmetric(horizontal: Sizes.spaceSmall),
titleLeading: const BackLeadingButton(),
body: const Column(
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SecurityLevelWidget(),
SixOrForUserPinWidget(),
DidKeyTypeWidget(),
SubjectSyntaxTypeWidget(),
CryptographicHolderBindingWidget(),
const SecurityLevelWidget(),
const SixOrForUserPinWidget(),
const DidKeyTypeWidget(),
const SubjectSyntaxTypeWidget(),
const CryptographicHolderBindingWidget(),
DrawerItem(
title: l10n.clientMetadata,
onTap: () {
final value = const JsonEncoder.withIndent(' ')
.convert(ConstantsJson.clientMetadata);
Navigator.of(context).push<void>(
JsonViewerPage.route(
title: l10n.clientMetadata,
data: value,
),
);
},
),
],
),
);
Expand Down
3 changes: 2 additions & 1 deletion lib/l10n/arb/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@
"displayConfiguration": "Display configuration",
"downloadConfiguration": "Download configuration",
"successfullyDownloaded": "Successfully Downloaded",
"advancedSecuritySettings": "Advanced Security Settings"
"advancedSecuritySettings": "Advanced Security Settings",
"clientMetadata": "Client Metadata"
}

12 changes: 8 additions & 4 deletions lib/l10n/untranslated.json
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,8 @@
"displayConfiguration",
"downloadConfiguration",
"successfullyDownloaded",
"advancedSecuritySettings"
"advancedSecuritySettings",
"clientMetadata"
],

"es": [
Expand Down Expand Up @@ -1806,7 +1807,8 @@
"displayConfiguration",
"downloadConfiguration",
"successfullyDownloaded",
"advancedSecuritySettings"
"advancedSecuritySettings",
"clientMetadata"
],

"fr": [
Expand Down Expand Up @@ -2014,7 +2016,8 @@
"displayConfiguration",
"downloadConfiguration",
"successfullyDownloaded",
"advancedSecuritySettings"
"advancedSecuritySettings",
"clientMetadata"
],

"it": [
Expand Down Expand Up @@ -2919,6 +2922,7 @@
"displayConfiguration",
"downloadConfiguration",
"successfullyDownloaded",
"advancedSecuritySettings"
"advancedSecuritySettings",
"clientMetadata"
]
}

0 comments on commit a4d2392

Please sign in to comment.