/** * Get the parameter of the challenge string * @return NameValue containing the parameter */ protected void parseParameter(AuthenticationHeader header) throws ParseException { if (debug) dbg_enter("parseParameter"); try { NameValue nv = this.nameValue('='); header.setParameter(nv); } finally { if (debug) dbg_leave("parseParameter"); } }
/** * parse the String message * @return SIPHeader (ProxyAuthenticate object) * @throws ParseException if the message does not respect the spec. */ public SIPHeader parse() throws ParseException { headerName(TokenTypes.PROXY_AUTHORIZATION); ProxyAuthorization proxyAuth = new ProxyAuthorization(); super.parse(proxyAuth); return proxyAuth; }
/** * parser the String message. * @param header - header structure to fill in. * @throws ParseException if the message does not respect the spec. */ public void parse(AuthenticationHeader header) throws ParseException { // the Scheme: this.lexer.SPorHT(); lexer.match(TokenTypes.ID); Token type = lexer.getNextToken(); this.lexer.SPorHT(); header.setScheme(type.getTokenValue()); // The parameters: try { while (lexer.lookAhead(0) != '\n') { this.parseParameter(header); this.lexer.SPorHT(); char la = lexer.lookAhead(0); if (la == '\n' || la == '\0') break; this.lexer.match(','); this.lexer.SPorHT(); } } catch (ParseException ex) { throw ex; } } }
/** * parse the String message * @return SIPHeader (ProxyAuthenticate object) * @throws ParseException if the message does not respect the spec. */ public SIPHeader parse() throws ParseException { headerName(TokenTypes.PROXY_AUTHENTICATE); ProxyAuthenticate proxyAuthenticate = new ProxyAuthenticate(); super.parse(proxyAuthenticate); return proxyAuthenticate; }
/** * parse the String message * @return SIPHeader (Authorization object) * @throws SIPParseException if the message does not respect the spec. */ public SIPHeader parse() throws ParseException { dbg_enter("parse"); try { headerName(TokenTypes.AUTHORIZATION); Authorization auth = new Authorization(); super.parse(auth); return auth; } finally { dbg_leave("parse"); } }
/** * parse the String message * @return SIPHeader (WWWAuthenticate object) * @throws SIPParseException if the message does not respect the spec. */ public SIPHeader parse() throws ParseException { if (debug) dbg_enter("parse"); try { headerName(TokenTypes.WWW_AUTHENTICATE); WWWAuthenticate wwwAuthenticate = new WWWAuthenticate(); super.parse(wwwAuthenticate); return wwwAuthenticate; } finally { if (debug) dbg_leave("parse"); } } }