1 Reply Latest reply: Feb 7, 2013 2:42 PM by 989752 RSS

    JC3 servlet PIN authentication

    989752
      Hello,

      I'm having some problems creating simple login/logout JC3 servlet using PIN or username and password. I'm useing NetBeans 7.2.1 and Java Card 3.0.2 Connected Edition.

      I see there is some authentication in AdminWeb application in the referential Transit application but I can't figure out how to use any of that in my project. Google searches and searches on this forum are not giving me any results either.
      Does anybody have a clue how to implement this simple login system?

      Any type of help is appreciated,
      Thank You.
        • 1. Re: JC3 servlet PIN authentication
          989752
          Hello again,

          here is what I got so far.
          This is what I have in my web.xml file:
          ...
              <security-constraint>
                  <display-name>PosudjivanjeKnjige</display-name>
                  <web-resource-collection>
                      <web-resource-name>PosudjivanjeKnjige</web-resource-name>
                      <description>URL posudjivanje knjige</description>
                      <url-pattern>/posudi</url-pattern>
                      <http-method>GET</http-method>
                  </web-resource-collection>
                  <auth-constraint>
                      <role-name>VLASNIK</role-name>
                  </auth-constraint>
              </security-constraint>
              <login-config>
                  <auth-method>BASIC</auth-method>
                  <realm-name>myWebApplication</realm-name>
              </login-config>
              <security-role>
                  <description>Vlasnik kartice</description>
                  <role-name>VLASNIK</role-name>
              </security-role>
          And this is what I have in my MANIFEST.MF file:
          Manifest-Version: 1.0
          Application-Type: web
          Web-Context-Path: /vannovak_knjiznica
          Runtime-Descriptor-Version: 3.0
          User-Role-List: VLASNIK
          VLASNIK-Mapped-To-Auth-URI: sio:///standard/auth/user/session/myWebApplication/vlasnik/password
          When I'm trying to access http://localhost:8019//vannovak_knjiznica/posudi from my web browser I get:
          HTTP ERROR: 403
          
          No realm for active authentication
          RequestURI=//vannovak_knjiznica/posudi
          
          Powered by Jetty://
          What does this error mean?

          Thank You for your time.