1 /* 2 * Licensed to the University Corporation for Advanced Internet Development, 3 * Inc. (UCAID) under one or more contributor license agreements. See the 4 * NOTICE file distributed with this work for additional information regarding 5 * copyright ownership. The UCAID licenses this file to You under the Apache 6 * License, Version 2.0 (the "License"); you may not use this file except in 7 * compliance with the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package edu.internet2.middleware.shibboleth.common.attribute; 19 20 import java.util.Collection; 21 import java.util.Map; 22 23 /** 24 * Base interface for attribute resolution requests. 25 */ 26 public interface AttributeRequestContext { 27 28 /** 29 * Gets the collection of IDs for the attributes being requested by the relying party. 30 * 31 * @return collection of IDs for the attributes being requested by the relying party 32 */ 33 public Collection<String> getRequestedAttributesIds(); 34 35 /** 36 * Sets the collection of IDs for the attributes being requested by the relying party. 37 * 38 * @param ids collection of IDs for the attributes being requested by the relying party 39 */ 40 public void setRequestedAttributes(Collection<String> ids); 41 42 /** 43 * Gets the retrieved attributes. 44 * 45 * @return retrieved attributes 46 */ 47 public Map<String, BaseAttribute> getAttributes(); 48 49 /** 50 * Sets the retrieved attributes. 51 * 52 * @param attributes retrieved attributes 53 */ 54 public void setAttributes(Map<String, BaseAttribute> attributes); 55 56 /** 57 * Gets the method used to authenticate the principal. 58 * 59 * @return method used to authenticate the principal 60 */ 61 public String getPrincipalAuthenticationMethod(); 62 63 /** 64 * Gets the principal name of the subject of the request. 65 * 66 * @return principal name of the subject of the request 67 */ 68 public String getPrincipalName(); 69 70 /** 71 * Sets the method used to authenticate the principal. 72 * 73 * @param method method used to authenticate the principal 74 */ 75 public void setPrincipalAuthenticationMethod(String method); 76 77 /** 78 * Sets the principal name of the subject of the request. 79 * 80 * @param name principal name of the subject of the request 81 */ 82 public void setPrincipalName(String name); 83 }