LoginException: Login failed: Security Exception

前端 未结 1 891
终归单人心
终归单人心 2020-12-06 03:01

I am attempting to setup container managed security with GlassFish v3.1.1 Build 12 and JSF 2.1. I keep getting the following exception for some reason and I am unable to log

1条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-06 03:29

    Just a guess: I'd try with jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg= as a hash for password admin.

    final MessageDigest messageDigest = java.security.MessageDigest.
            getInstance("SHA-256");
    final byte bin[] = messageDigest.digest(("admin").getBytes());
    System.out.println(Base64.encodeBase64String(bin));
    

    (Base64 from Apache Commons Codec)


    Another idea: Try with hash 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 (password: admin) and HEX encoding. It was generated with:

    final String hash = DigestUtils.sha256Hex("admin");
    System.out.println(hash);
    

    0 讨论(0)
提交回复
热议问题