/** * Default constructor for RFC2617 compliant authetication schemes. * * @param challenge authentication challenge * * @throws MalformedChallengeException is thrown if the authentication challenge * is malformed * * @deprecated Use parameterless constructor and {@link AuthScheme#processChallenge(String)} * method */ public RFC2617Scheme(final String challenge) throws MalformedChallengeException { super(); processChallenge(challenge); }
/** * Returns authentication realm. The realm may not be null. * * @return the authentication realm */ public String getRealm() { return getParameter("realm"); }
/** * Returns a String identifying the authentication challenge. This is * used, in combination with the host and port to determine if * authorization has already been attempted or not. Schemes which * require multiple requests to complete the authentication should * return a different value for each stage in the request. * * <p>Additionally, the ID should take into account any changes to the * authentication challenge and return a different value when appropriate. * For example when the realm changes in basic authentication it should be * considered a different authentication attempt and a different value should * be returned.</p> * * <p>This method simply returns the realm for the challenge.</p> * * @return String a String identifying the authentication challenge. The * returned value may be null. * * @deprecated no longer used */ public String getID() { return getRealm(); } }
/** * Processes the given challenge token. Some authentication schemes * may involve multiple challenge-response exchanges. Such schemes must be able * to maintain the state information when dealing with sequential challenges * * @param challenge the challenge string * * @throws MalformedChallengeException is thrown if the authentication challenge * is malformed * * @since 3.0 */ public void processChallenge(final String challenge) throws MalformedChallengeException { String s = AuthChallengeParser.extractScheme(challenge); if (!s.equalsIgnoreCase(getSchemeName())) { throw new MalformedChallengeException( "Invalid " + getSchemeName() + " challenge: " + challenge); } this.params = AuthChallengeParser.extractParams(challenge); }
/** * Processes the given challenge token. Some authentication schemes * may involve multiple challenge-response exchanges. Such schemes must be able * to maintain the state information when dealing with sequential challenges * * @param challenge the challenge string * * @throws MalformedChallengeException is thrown if the authentication challenge * is malformed * * @since 3.0 */ public void processChallenge(final String challenge) throws MalformedChallengeException { String s = AuthChallengeParser.extractScheme(challenge); if (!s.equalsIgnoreCase(getSchemeName())) { throw new MalformedChallengeException( "Invalid " + getSchemeName() + " challenge: " + challenge); } this.params = AuthChallengeParser.extractParams(challenge); }
/** * Processes the Basic challenge. * * @param challenge the challenge string * * @throws MalformedChallengeException is thrown if the authentication challenge * is malformed * * @since 3.0 */ public void processChallenge(String challenge) throws MalformedChallengeException { super.processChallenge(challenge); this.complete = true; }
/** * Returns authentication realm. The realm may not be null. * * @return the authentication realm */ public String getRealm() { return getParameter("realm"); }
/** * Processes the given challenge token. Some authentication schemes * may involve multiple challenge-response exchanges. Such schemes must be able * to maintain the state information when dealing with sequential challenges * * @param challenge the challenge string * * @throws MalformedChallengeException is thrown if the authentication challenge * is malformed * * @since 3.0 */ public void processChallenge(final String challenge) throws MalformedChallengeException { String s = AuthChallengeParser.extractScheme(challenge); if (!s.equalsIgnoreCase(getSchemeName())) { throw new MalformedChallengeException( "Invalid " + getSchemeName() + " challenge: " + challenge); } this.params = AuthChallengeParser.extractParams(challenge); }
/** * Returns a String identifying the authentication challenge. This is * used, in combination with the host and port to determine if * authorization has already been attempted or not. Schemes which * require multiple requests to complete the authentication should * return a different value for each stage in the request. * * <p>Additionally, the ID should take into account any changes to the * authentication challenge and return a different value when appropriate. * For example when the realm changes in basic authentication it should be * considered a different authentication attempt and a different value should * be returned.</p> * * <p>This method simply returns the realm for the challenge.</p> * * @return String a String identifying the authentication challenge. The * returned value may be null. * * @deprecated no longer used */ public String getID() { return getRealm(); } }
super.processChallenge(challenge);
/** * Returns authentication realm. The realm may not be null. * * @return the authentication realm */ public String getRealm() { return getParameter("realm"); }
/** * Processes the given challenge token. Some authentication schemes * may involve multiple challenge-response exchanges. Such schemes must be able * to maintain the state information when dealing with sequential challenges * * @param challenge the challenge string * * @throws MalformedChallengeException is thrown if the authentication challenge * is malformed * * @since 3.0 */ public void processChallenge(final String challenge) throws MalformedChallengeException { String s = AuthChallengeParser.extractScheme(challenge); if (!s.equalsIgnoreCase(getSchemeName())) { throw new MalformedChallengeException( "Invalid " + getSchemeName() + " challenge: " + challenge); } this.params = AuthChallengeParser.extractParams(challenge); }
/** * Returns a String identifying the authentication challenge. This is * used, in combination with the host and port to determine if * authorization has already been attempted or not. Schemes which * require multiple requests to complete the authentication should * return a different value for each stage in the request. * * <p>Additionally, the ID should take into account any changes to the * authentication challenge and return a different value when appropriate. * For example when the realm changes in basic authentication it should be * considered a different authentication attempt and a different value should * be returned.</p> * * <p>This method simply returns the realm for the challenge.</p> * * @return String a String identifying the authentication challenge. The * returned value may be null. * * @deprecated no longer used */ public String getID() { return getRealm(); } }
/** * Default constructor for RFC2617 compliant authetication schemes. * * @param challenge authentication challenge * * @throws MalformedChallengeException is thrown if the authentication challenge * is malformed * * @deprecated Use parameterless constructor and {@link AuthScheme#processChallenge(String)} * method */ public RFC2617Scheme(final String challenge) throws MalformedChallengeException { super(); processChallenge(challenge); }
/** * Returns authentication realm. The realm may not be null. * * @return the authentication realm */ public String getRealm() { return getParameter("realm"); }
/** * Processes the given challenge token. Some authentication schemes * may involve multiple challenge-response exchanges. Such schemes must be able * to maintain the state information when dealing with sequential challenges * * @param challenge the challenge string * * @throws MalformedChallengeException is thrown if the authentication challenge * is malformed * * @since 3.0 */ public void processChallenge(final String challenge) throws MalformedChallengeException { String s = AuthChallengeParser.extractScheme(challenge); if (!s.equalsIgnoreCase(getSchemeName())) { throw new MalformedChallengeException( "Invalid " + getSchemeName() + " challenge: " + challenge); } this.params = AuthChallengeParser.extractParams(challenge); }
/** * Returns a String identifying the authentication challenge. This is * used, in combination with the host and port to determine if * authorization has already been attempted or not. Schemes which * require multiple requests to complete the authentication should * return a different value for each stage in the request. * * <p>Additionally, the ID should take into account any changes to the * authentication challenge and return a different value when appropriate. * For example when the realm changes in basic authentication it should be * considered a different authentication attempt and a different value should * be returned.</p> * * <p>This method simply returns the realm for the challenge.</p> * * @return String a String identifying the authentication challenge. The * returned value may be null. * * @deprecated no longer used */ public String getID() { return getRealm(); } }
/** * Default constructor for RFC2617 compliant authetication schemes. * * @param challenge authentication challenge * * @throws MalformedChallengeException is thrown if the authentication challenge * is malformed * * @deprecated Use parameterless constructor and {@link AuthScheme#processChallenge(String)} * method */ public RFC2617Scheme(final String challenge) throws MalformedChallengeException { super(); processChallenge(challenge); }
/** * Returns authentication realm. The realm may not be null. * * @return the authentication realm */ public String getRealm() { return getParameter("realm"); }
/** * Returns a String identifying the authentication challenge. This is * used, in combination with the host and port to determine if * authorization has already been attempted or not. Schemes which * require multiple requests to complete the authentication should * return a different value for each stage in the request. * * <p>Additionally, the ID should take into account any changes to the * authentication challenge and return a different value when appropriate. * For example when the realm changes in basic authentication it should be * considered a different authentication attempt and a different value should * be returned.</p> * * <p>This method simply returns the realm for the challenge.</p> * * @return String a String identifying the authentication challenge. The * returned value may be null. * * @deprecated no longer used */ public String getID() { return getRealm(); } }