001/* 002 * oauth2-oidc-sdk 003 * 004 * Copyright 2012-2020, Connect2id Ltd and contributors. 005 * 006 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use 007 * this file except in compliance with the License. You may obtain a copy of the 008 * License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software distributed 013 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 014 * CONDITIONS OF ANY KIND, either express or implied. See the License for the 015 * specific language governing permissions and limitations under the License. 016 */ 017 018package com.nimbusds.openid.connect.sdk.federation.policy.factories; 019 020 021import com.nimbusds.openid.connect.sdk.federation.policy.MetadataPolicy; 022import com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation; 023import com.nimbusds.openid.connect.sdk.rp.OIDCClientMetadata; 024 025 026/** 027 * OpenID relying party metadata policy factory. 028 */ 029public interface RPMetadataPolicyFactory { 030 031 032 /** 033 * Creates an OpenID relying party metadata policy for an explicit 034 * client registration. 035 * 036 * @param initialMetadata The initial metadata submitted by the relying 037 * party. Must not be {@code null}. 038 * @param target The registered OpenID relying party 039 * information. Must not be {@code null}. 040 * 041 * @return The OpenID relying party metadata policy. 042 * 043 * @throws PolicyFormulationException If the metadata policy couldn't 044 * be formulated. 045 */ 046 MetadataPolicy create(final OIDCClientMetadata initialMetadata, final OIDCClientInformation target) 047 throws PolicyFormulationException; 048}