Save This Page
Home » rampart-dist-1.4-src » org.apache » rahas » impl » [javadoc | source]
    1   /*
    2    * Copyright 2004,2005 The Apache Software Foundation.
    3    *
    4    * Licensed under the Apache License, Version 2.0 (the "License");
    5    * you may not use this file except in compliance with the License.
    6    * You may obtain a copy of the License at
    7    *
    8    *       http://www.apache.org/licenses/LICENSE-2.0
    9    *
   10    * Unless required by applicable law or agreed to in writing, software
   11    * distributed under the License is distributed on an "AS IS" BASIS,
   12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   13    * See the License for the specific language governing permissions and
   14    * limitations under the License.
   15    */
   16   package org.apache.rahas.impl;
   17   
   18   import org.apache.axiom.om.OMElement;
   19   
   20   import javax.xml.namespace.QName;
   21   
   22   /**
   23    *
   24    */
   25   public abstract class AbstractIssuerConfig {
   26   
   27       /**
   28        * The key computation policy when clien't entropy is provided
   29        */
   30       public static class KeyComputation {
   31           public static final QName KEY_COMPUTATION = new QName("keyComputation");
   32           public final static int KEY_COMP_USE_REQ_ENT = 1;
   33           public final static int KEY_COMP_PROVIDE_ENT = 2;
   34           public final static int KEY_COMP_USE_OWN_KEY = 3;
   35       }
   36   
   37       public final static QName ADD_REQUESTED_ATTACHED_REF = new QName("addRequestedAttachedRef");
   38       public final static QName ADD_REQUESTED_UNATTACHED_REF = new QName("addRequestedUnattachedRef");
   39       public static final QName PROOF_KEY_TYPE = new QName("proofKeyType");
   40   
   41       /**
   42        * Element name to include the crypto properties used to load the
   43        * information used securing the response
   44        */
   45       public final static QName CRYPTO_PROPERTIES = new QName("cryptoProperties");
   46       public static final QName CRYPTO = new QName("crypto");
   47       public static final QName PROVIDER = new QName("provider");
   48       public static final QName PROPERTY = new QName("property");
   49   
   50       protected int keyComputation = KeyComputation.KEY_COMP_PROVIDE_ENT;
   51       protected String proofKeyType = TokenIssuerUtil.ENCRYPTED_KEY;
   52       protected boolean addRequestedAttachedRef;
   53       protected boolean addRequestedUnattachedRef;
   54       protected long ttl = 300000;
   55       protected String cryptoPropertiesFile;
   56       protected OMElement cryptoPropertiesElement;
   57       protected OMElement cryptoElement;
   58       protected int keySize = 256;
   59       
   60       public void setAddRequestedAttachedRef(boolean addRequestedAttachedRef) {
   61           this.addRequestedAttachedRef = addRequestedAttachedRef;
   62       }
   63       public void setAddRequestedUnattachedRef(boolean addRequestedUnattachedRef) {
   64           this.addRequestedUnattachedRef = addRequestedUnattachedRef;
   65       }
   66       public void setKeyComputation(int keyComputation) {
   67           this.keyComputation = keyComputation;
   68       }
   69       public void setProofKeyType(String proofKeyType) {
   70           this.proofKeyType = proofKeyType;
   71       }
   72       public void setTtl(long ttl) {
   73           this.ttl = ttl;
   74       }
   75       public void setKeySize(int keySize) {
   76           this.keySize = keySize;
   77       }
   78       public String getProofKeyType() {
   79           return proofKeyType;
   80       }
   81   }

Save This Page
Home » rampart-dist-1.4-src » org.apache » rahas » impl » [javadoc | source]