From 0ac634a709a824d331ddbd81d94cd44695164de4 Mon Sep 17 00:00:00 2001 From: zhongyuan17 Date: Wed, 3 Apr 2024 20:35:28 +0800 Subject: [PATCH] issue#72 make DevOnlyAuthProvider's behavior more straightforward (#73) --- .../bifromq/plugin/authprovider/DevOnlyAuthProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bifromq-plugin/bifromq-plugin-auth-provider-helper/src/main/java/com/baidu/bifromq/plugin/authprovider/DevOnlyAuthProvider.java b/bifromq-plugin/bifromq-plugin-auth-provider-helper/src/main/java/com/baidu/bifromq/plugin/authprovider/DevOnlyAuthProvider.java index 95d2b5222..d6e72e43a 100644 --- a/bifromq-plugin/bifromq-plugin-auth-provider-helper/src/main/java/com/baidu/bifromq/plugin/authprovider/DevOnlyAuthProvider.java +++ b/bifromq-plugin/bifromq-plugin-auth-provider-helper/src/main/java/com/baidu/bifromq/plugin/authprovider/DevOnlyAuthProvider.java @@ -42,14 +42,14 @@ public CompletableFuture auth(MQTT3AuthData authData) { return CompletableFuture.completedFuture(MQTT3AuthResult.newBuilder() .setOk(Ok.newBuilder() .setTenantId("DevOnly") - .setUserId("DevUser_" + System.nanoTime()).build()) + .setUserId(authData.getUsername()).build()) .build()); } } else { return CompletableFuture.completedFuture(MQTT3AuthResult.newBuilder() .setOk(Ok.newBuilder() .setTenantId("DevOnly") - .setUserId("DevUser_" + System.nanoTime()).build()) + .setUserId("DevUser").build()) .build()); } }