<commit_before>/*
 * oxCore is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
 *
 * Copyright (c) 2014, Gluu
 */

package org.gluu.saml;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;
import java.util.UUID;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import org.apache.commons.codec.binary.Base64;
import org.apache.log4j.Logger;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xdi.zip.CompressionHelper;

/**
 * Preapres SAML request
 * 
 * @author <NAME> Date: 24/04/2014
 */
public class AuthRequest {

	private static final Logger log = Logger.getLogger(AuthRequest.class);
	private static final SimpleDateFormat simpleDataFormat = new SimpleDateFormat("yyyy-MM-dd'T'H:mm:ss");

	static {
		simpleDataFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
	}

	private String id;
	private String issueInstant;
	private SamlConfiguration samlSettings;

	public AuthRequest(SamlConfiguration samlConfiguration) {
		this.samlSettings = samlConfiguration;
		this.id = "_" + UUID.randomUUID().toString();<commit_msg>Fixed SAML jython script time format<commit_after>/*
 * oxCore is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
 *
 * Copyright (c) 2014, Gluu
 */

package org.gluu.saml;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;
import java.util.UUID;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import org.apache.commons.codec.binary.Base64;
import org.apache.log4j.Logger;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xdi.zip.CompressionHelper;

/**
 * Preapres SAML request
 * 
 * @author <NAME> Date: 24/04/2014
 */
public class AuthRequest {

	private static final Logger log = Logger.getLogger(AuthRequest.class);
	private static final SimpleDateFormat simpleDataFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");

	static {
		simpleDataFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
	}

	private String id;
	private String issueInstant;
	private SamlConfiguration samlSettings;

	public AuthRequest(SamlConfiguration samlConfiguration) {
		this.samlSettings = samlConfiguration;
		this.id = "_" + UUID.randomUUID().toString();
{'fraction_non_alphanumeric': 0.10765202211230725, 'fraction_numerical': 0.012219959266802444, 'mean_word_length': 5.71484375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 24}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5211557', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1047, 'n_words': 222}