a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Copyright (c) 2010 Sun Microsystems Inc. All Rights Reserved
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * The contents of this file are subject to the terms
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * of the Common Development and Distribution License
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * (the License). You may not use this file except in
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * See the License for the specific language governing
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * permission and limitations under the License.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * When distributing Covered Code, include this CDDL
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Header Notice in each file and include the License file
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * If applicable, add the following below the CDDL Header,
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * with the fields enclosed by brackets [] replaced by
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * $Id: exportmetadata.aspx,v 1.1 2010/01/12 18:04:55 ggennaro Exp $
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster<%@ Import Namespace="System.Security.Cryptography" %>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster<%@ Import Namespace="System.Security.Cryptography.X509Certificates" %>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster<%@ Import Namespace="Sun.Identity.Saml2.Exceptions" %>
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Exports the metadata for the hosted service provider (aka .NET Fedlet)
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * Following are the list of supported query parameters:
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * --------------- -----------
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * sign Sign the metadata with the specified signing
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * certificate. Defaults to "false" since siging
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster * certificates are not, by default, configured.
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster ServiceProviderUtility serviceProviderUtility = (ServiceProviderUtility)Cache["spu"];
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster serviceProviderUtility = new ServiceProviderUtility(Context);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster bool signMetadata = Saml2Utils.GetBoolean(Request.Params["sign"]);
a688bcbb4bcff5398fdd29b86f83450257dc0df4Allan Foster Response.Write(serviceProviderUtility.ServiceProvider.GetExportableMetadata(signMetadata));