/**
   * GET api/authentication
   *
   * <p>This action is called once the user clicks the "Sign In" button.
   */
  @RequestMapping(
      value = "/api/authentication",
      method = {RequestMethod.GET})
  public String get() throws RestException {

    // Instantiate the Authentication class
    Authentication auth = new Authentication(Util.getRestPkiClient());

    // Call the Authentication startWithWebPki() method, which initiates the authentication. This
    // yields the token,
    // a 22-character case-sensitive URL-safe string, which we'll send to the page in order to pass
    // on the
    // signWithRestPki method of the Web PKI component.
    String token = auth.startWithWebPki(Util.getSecurityContext());

    // Note: By changing the SecurityContext above you can accept only certificates from a certain
    // PKI,
    // for instance, ICP-Brasil (SecurityContext.pkiBrazil).

    // Return the token to the page
    return token;
  }