【问题标题】:Couchdb with JWT auth has error "unknown_error : undef" not able see Fauxton带有 JWT auth 的 Couchdb 出现错误“unknown_error:undef”无法看到 Fauxton
【发布时间】:2020-09-21 15:09:57
【问题描述】:

这里是配置 local.ini 文件

[jwt_auth]
required_claims = sub

[jwt_keys]
hmac:_default = aGVsbG8=

[chttpd]
authentication_handlers = {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}, {chttpd_auth, jwt_authentication_handler}

当我尝试访问 http://localhost:5984 时出现以下错误

{"error":"unknown_error","reason":"undef","ref":6776463}

我可以在控制台看到下面的登录信息

[error] 2020-09-20T14:37:04.994313Z nonode@nohost <0.506.0> 8bbcfe9007 req_err(6776463) unknown_error : undef
    [<<"chttpd_auth:jwt_authentication_handler/1">>,<<"chttpd:authenticate_request/2 L531">>,<<"chttpd:process_request/1 L303">>,<<"chttpd:handle_request_int/1 L243">>,<<"mochiweb_http:headers/6 L150">>,<<"proc_lib:init_p_do_apply/3 L247">>]

更多信息:

a:在 docker 上运行

b:沙发 3.0 版

我是否错过了任何配置,或者我们有任何可以交叉检查配置的参考。

【问题讨论】:

    标签: couchdb jwt-auth


    【解决方案1】:

    这是沙发数据库版本的问题

    更新到 3.1.1

    [jwt_auth]
    required_claims = exp
    
    [jwt_keys]
    hmac:_default = aGVsbG8=
    
    [chttpd]
    authentication_handlers = {chttpd_auth, jwt_authentication_handler}, {chttpd_auth, cookie_authentication_handler}, {chttpd_auth, default_authentication_handler}
    

    这些是.ini文件中的配置

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-02-28
      • 2022-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-28
      相关资源
      最近更新 更多