Skip to content

Commit

Permalink
Merge pull request #1532 from atsign-foundation/otp_server_spec
Browse files Browse the repository at this point in the history
fix: Rename TOTP to OTP
  • Loading branch information
sitaram-kalluri authored Aug 31, 2023
2 parents 09fecd4 + 04f7792 commit 80b5963
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
8 changes: 4 additions & 4 deletions packages/at_root_server/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ dependencies:
args: ^2.1.0
uuid: ^3.0.4
yaml: ^3.1.0
at_commons: ^3.0.0
at_utils: ^3.0.0
at_server_spec: ^3.0.0
at_commons: 3.0.53
at_utils: 3.0.15
at_server_spec: 3.0.13
at_persistence_root_server:
git:
url: https://github.com/atsign-foundation/at_server.git
Expand All @@ -26,5 +26,5 @@ dev_dependencies:
# Adding test_cov for generating the test coverage.
test_cov: ^1.0.1
lints: ^1.0.1
test: ^1.17.3
test: ^1.24.6
coverage: ^1.0.3
2 changes: 2 additions & 0 deletions packages/at_server_spec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 3.0.14
- fix: Rename TOTP to OTP
## 3.0.13
- feat: added keys verb
- experimental: added totp verb
Expand Down
6 changes: 3 additions & 3 deletions packages/at_server_spec/lib/src/verb/enroll.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import 'package:at_commons/at_commons.dart';
/// Secondary server will notify the new enrollment request to already enrolled apps which have access to __manage namespace.
/// The enrolled app which receives the notification may approve or reject the enrollment request.
/// Syntax
/// enroll:request:appName:<appName>:deviceName:<deviceName>:namespaces:<namespaces>:totp:<totp>:apkamPublicKey:<apkamPublicKey>
/// enroll:request:appName:<appName>:deviceName:<deviceName>:namespaces:<namespaces>:otp:<otp>:apkamPublicKey:<apkamPublicKey>
/// appName - Name of the app or client requesting enrollment
/// deviceName- Name of the device or client
/// namespaces - List of namespaces the requesting app or client needs access e.g [wavi,r;buzz,rw]
/// totp - timebased OTP which has to fetched from an already enrolled app
/// otp - timebased OTP which has to fetched from an already enrolled app
/// apkamPublicKey - new pkam public key from the requesting app/client
class Enroll extends Verb {
@override
Expand All @@ -25,7 +25,7 @@ class Enroll extends Verb {

@override
String usage() {
return 'enroll:request:appName:wavi:deviceName:iPhone:namespaces:[wavi,rw]:totp:<totp>:apkamPublicKey:<public_key>';
return 'enroll:request:{"appName":"wavi","deviceName":"iPhone","namespaces":{"wavi":"rw"},"otp":"<otp>":"apkamPublicKey":"<public_key>"}';
}

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import 'package:meta/meta.dart';

/// Verb used for generating OTP for APKAM enrollments
@experimental
class Totp extends Verb {
class Otp extends Verb {
@override
String name() => 'totp';
String name() => 'otp';

@override
String syntax() => VerbSyntax.totp;
String syntax() => VerbSyntax.otp;

@override
Verb? dependsOn() {
Expand All @@ -18,7 +18,7 @@ class Totp extends Verb {

@override
String usage() {
return 'totp:get or totp:validate:<otp>';
return 'otp:get or otp:validate:<otp>';
}

@override
Expand Down
2 changes: 1 addition & 1 deletion packages/at_server_spec/lib/verbs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ export 'package:at_server_spec/src/verb/update_meta.dart';
export 'package:at_server_spec/src/verb/verb.dart';
export 'package:at_server_spec/src/verb/notify_fetch.dart';
export 'package:at_server_spec/src/verb/enroll.dart';
export 'package:at_server_spec/src/verb/totp.dart';
export 'package:at_server_spec/src/verb/otp.dart';
export 'package:at_server_spec/src/verb/keys.dart';
4 changes: 2 additions & 2 deletions packages/at_server_spec/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: at_server_spec
description: A Dart library containing abstract classes that defines what implementations of the root and secondary servers are responsible for.
version: 3.0.13
version: 3.0.14
repository: https://github.com/atsign-foundation/at_server
homepage: https://docs.atsign.com
documentation: https://docs.atsign.com/atplatform/secondaryserver
Expand All @@ -10,7 +10,7 @@ environment:

dependencies:
meta: ^1.8.0
at_commons: ^3.0.50
at_commons: ^3.0.54

dev_dependencies:
lints: ^1.0.1

0 comments on commit 80b5963

Please sign in to comment.