code: @Override
      public final Optional<C> getCredentials(final WebContext context) {
          init();
          final Optional<C> optCredentials = retrieveCredentials(context);
          // no credentials -> save this authentication has already been tried and failed
          if (!optCredentials.isPresent()) {
              context.getSessionStore().set(context, getName() + ATTEMPTED_AUTHENTICATION_SUFFIX, "true");
          } else {
              cleanAttemptedAuthentication(context);
          }
          return optCredentials;
      }
docs: <p>Get the credentials from the web context. In some cases, a {@link HttpAction} may be thrown:</p>
  <ul>
  <li>if the <code>CasClient</code> receives a logout request, it returns a 200 HTTP status code</li>
  <li>for the <code>IndirectBasicAuthClient</code>, if no credentials are sent to the callback url, an unauthorized response
  (401 HTTP status code) is returned to request credentials through a popup.</li>
  </ul>
  
  @param context the current web context
  @return the credentials