anchor.diff:                                  _ ->
                                       undefined
                               end,
  -                    {allowed, store_user_info(Req, Identity, Token)};
  +                    {allowed, Identity, Token};
                   Other ->
                       Other
               end
  
positive.code:          verify_local_token/1]).
  
  %% rpc from ns_couchdb node
  -export([authenticate/1,
           saslauthd_authenticate/2]).
  
  %% External API
  
  
negative.code:                           false | {ok, rbac_identity()} | {error, term()}.
  authenticate(undefined) ->
      {ok, {"", anonymous}};
  authenticate({token, Token}) ->
      case menelaus_ui_auth:check(Token) of
          false ->
              %% this is needed so UI can get /pools on unprovisioned
              %% system with leftover cookie
              case ns_config_auth:is_system_provisioned() of
                  false ->
                      {ok, {"", wrong_token}};
                  true ->
                      false
              end;
          Other ->
              Other
      end;
  authenticate({Username, Password}) ->
      case ns_config_auth:authenticate(Username, Password) of
  