/******************************************************************************* * Copyright 2014 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal * Chancellery Austria - ICT staff unit, and Graz University of Technology. * * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by * the European Commission - subsequent versions of the EUPL (the "Licence"); * You may not use this work except in compliance with the Licence. * You may obtain a copy of the Licence at: * http://www.osor.eu/eupl/ * * Unless required by applicable law or agreed to in writing, software * distributed under the Licence is distributed on an "AS IS" basis, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Licence for the specific language governing permissions and * limitations under the Licence. * * This product combines work with different licenses. See the "NOTICE" text * file for details on the various modules and licenses. * The "NOTICE" text file is part of the distribution. Any derivative works * that you distribute must include a readable copy of the "NOTICE" text file. ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal * Chancellery Austria - ICT staff unit, and Graz University of Technology. * * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by * the European Commission - subsequent versions of the EUPL (the "Licence"); * You may not use this work except in compliance with the Licence. * You may obtain a copy of the Licence at: * http://www.osor.eu/eupl/ * * Unless required by applicable law or agreed to in writing, software * distributed under the Licence is distributed on an "AS IS" basis, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Licence for the specific language governing permissions and * limitations under the Licence. * * This product combines work with different licenses. See the "NOTICE" text * file for details on the various modules and licenses. * The "NOTICE" text file is part of the distribution. Any derivative works * that you distribute must include a readable copy of the "NOTICE" text file. */ package at.gv.egovernment.moa.id.auth.data; import org.w3c.dom.Element; /** * Contains an infobox token included in an InfoboxReadResponse. * Depending on whether the token is extracted from an XMLContent or a * Base64Content it is either returned as DOM element * ({@link #getXMLToken()}) or base64 encoded string ({@link #getBase64Token()}). * * @author Harald Bratko */ public interface InfoboxToken { /** * The key of the corresponding infobox. * This is the value of Key attribute of the <Pair> child * element in an <AssocArrayData> content of an InfoboxReadResponse. * Maybe null if the InfoboxReadResponse conatains BinaryFileData. * * * @return The key identifier of the corresponding infobox. */ public String getKey(); /** * Specifies if this token is the first token (e.g in an array of tokens) included in an * InfoboxReadResponse. If true this token is the token to be * validated by a corresponding * {@link at.gv.egovernment.moa.id.auth.validator.InfoboxValidator InfoboxValidator}. * If false this token maybe needed to validate the primary token. * * @return True if this token is the first token. */ public boolean isPrimary(); /** * Returns the infobox token. * Maybe null if the token is returned by method {@link #getBase64Token()} * as base64 encoded string. *
* Note that this token is not validated against the * application specific schema (e.g. Mandates schema in the mandates context). * Thus the validating application has to validate the token * against the appropriate schema. * * @return The infobox token. If null the token is returned by method * {@link #getBase64Token()} as base64 encoded string. */ public Element getXMLToken(); /** * Returns the infobox token. * Maybe null if the token is returned by method {@link #getXMLToken()} * as a DOM element. *
* Note, that the base64 encoded string actually may include more than one infobox * elements. * * @return The infobox token. If null the token is returned by method * {@link #getBase64Token()} as base64 encoded string. */ public String getBase64Token(); }