Credenziali.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.core.config;

  21. import javax.xml.bind.annotation.XmlAccessType;
  22. import javax.xml.bind.annotation.XmlAccessorType;
  23. import javax.xml.bind.annotation.XmlAttribute;
  24. import javax.xml.bind.annotation.XmlRootElement;
  25. import javax.xml.bind.annotation.XmlType;
  26. import org.openspcoop2.core.config.constants.CredenzialeTipo;
  27. import java.io.Serializable;


  28. /** <p>Java class for credenziali complex type.
  29.  *
  30.  * <p>The following schema fragment specifies the expected content contained within this class.
  31.  *
  32.  * <pre>
  33.  * &lt;complexType name="credenziali"&gt;
  34.  *      &lt;attribute name="tipo" type="{http://www.openspcoop2.org/core/config}CredenzialeTipo" use="optional" default="ssl"/&gt;
  35.  *      &lt;attribute name="user" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  36.  *      &lt;attribute name="password" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  37.  *      &lt;attribute name="app-id" type="{http://www.w3.org/2001/XMLSchema}boolean" use="optional" default="false"/&gt;
  38.  *      &lt;attribute name="subject" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  39.  *      &lt;attribute name="cn-subject" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  40.  *      &lt;attribute name="issuer" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  41.  *      &lt;attribute name="cn-issuer" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  42.  *      &lt;attribute name="certificate" type="{http://www.w3.org/2001/XMLSchema}base64Binary" use="optional"/&gt;
  43.  *      &lt;attribute name="certificate-strict-verification" type="{http://www.w3.org/2001/XMLSchema}boolean" use="optional" default="false"/&gt;
  44.  *      &lt;attribute name="token-policy" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  45.  * &lt;/complexType&gt;
  46.  * </pre>
  47.  *
  48.  * @version $Rev$, $Date$
  49.  *
  50.  * @author Poli Andrea (poli@link.it)
  51.  * @author $Author$
  52.  * */

  53. @XmlAccessorType(XmlAccessType.FIELD)
  54. @XmlType(name = "credenziali")

  55. @XmlRootElement(name = "credenziali")

  56. public class Credenziali extends org.openspcoop2.utils.beans.BaseBeanWithId implements Serializable , Cloneable {
  57.   public Credenziali() {
  58.     super();
  59.   }

  60.   public void setTipoRawEnumValue(String value) {
  61.     this.tipo = (CredenzialeTipo) CredenzialeTipo.toEnumConstantFromString(value);
  62.   }

  63.   public String getTipoRawEnumValue() {
  64.     if(this.tipo == null){
  65.         return null;
  66.     }else{
  67.         return this.tipo.toString();
  68.     }
  69.   }

  70.   public org.openspcoop2.core.config.constants.CredenzialeTipo getTipo() {
  71.     return this.tipo;
  72.   }

  73.   public void setTipo(org.openspcoop2.core.config.constants.CredenzialeTipo tipo) {
  74.     this.tipo = tipo;
  75.   }

  76.   public java.lang.String getUser() {
  77.     return this.user;
  78.   }

  79.   public void setUser(java.lang.String user) {
  80.     this.user = user;
  81.   }

  82.   public java.lang.String getPassword() {
  83.     return this.password;
  84.   }

  85.   public void setPassword(java.lang.String password) {
  86.     this.password = password;
  87.   }

  88.   public boolean isAppId() {
  89.     return this.appId;
  90.   }

  91.   public boolean getAppId() {
  92.     return this.appId;
  93.   }

  94.   public void setAppId(boolean appId) {
  95.     this.appId = appId;
  96.   }

  97.   public java.lang.String getSubject() {
  98.     return this.subject;
  99.   }

  100.   public void setSubject(java.lang.String subject) {
  101.     this.subject = subject;
  102.   }

  103.   public java.lang.String getCnSubject() {
  104.     return this.cnSubject;
  105.   }

  106.   public void setCnSubject(java.lang.String cnSubject) {
  107.     this.cnSubject = cnSubject;
  108.   }

  109.   public java.lang.String getIssuer() {
  110.     return this.issuer;
  111.   }

  112.   public void setIssuer(java.lang.String issuer) {
  113.     this.issuer = issuer;
  114.   }

  115.   public java.lang.String getCnIssuer() {
  116.     return this.cnIssuer;
  117.   }

  118.   public void setCnIssuer(java.lang.String cnIssuer) {
  119.     this.cnIssuer = cnIssuer;
  120.   }

  121.   public byte[] getCertificate() {
  122.     return this.certificate;
  123.   }

  124.   public void setCertificate(byte[] certificate) {
  125.     this.certificate = certificate;
  126.   }

  127.   public boolean isCertificateStrictVerification() {
  128.     return this.certificateStrictVerification;
  129.   }

  130.   public boolean getCertificateStrictVerification() {
  131.     return this.certificateStrictVerification;
  132.   }

  133.   public void setCertificateStrictVerification(boolean certificateStrictVerification) {
  134.     this.certificateStrictVerification = certificateStrictVerification;
  135.   }

  136.   public java.lang.String getTokenPolicy() {
  137.     return this.tokenPolicy;
  138.   }

  139.   public void setTokenPolicy(java.lang.String tokenPolicy) {
  140.     this.tokenPolicy = tokenPolicy;
  141.   }

  142.   private static final long serialVersionUID = 1L;



  143.   @javax.xml.bind.annotation.XmlTransient
  144.   protected java.lang.String tipoRawEnumValue;

  145.   @XmlAttribute(name="tipo",required=false)
  146.   protected CredenzialeTipo tipo = (CredenzialeTipo) CredenzialeTipo.toEnumConstantFromString("ssl");

  147.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  148.   @XmlAttribute(name="user",required=false)
  149.   protected java.lang.String user;

  150.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  151.   @XmlAttribute(name="password",required=false)
  152.   protected java.lang.String password;

  153.   @javax.xml.bind.annotation.XmlSchemaType(name="boolean")
  154.   @XmlAttribute(name="app-id",required=false)
  155.   protected boolean appId = false;

  156.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  157.   @XmlAttribute(name="subject",required=false)
  158.   protected java.lang.String subject;

  159.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  160.   @XmlAttribute(name="cn-subject",required=false)
  161.   protected java.lang.String cnSubject;

  162.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  163.   @XmlAttribute(name="issuer",required=false)
  164.   protected java.lang.String issuer;

  165.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  166.   @XmlAttribute(name="cn-issuer",required=false)
  167.   protected java.lang.String cnIssuer;

  168.   @javax.xml.bind.annotation.XmlSchemaType(name="base64Binary")
  169.   @XmlAttribute(name="certificate",required=false)
  170.   protected byte[] certificate;

  171.   @javax.xml.bind.annotation.XmlSchemaType(name="boolean")
  172.   @XmlAttribute(name="certificate-strict-verification",required=false)
  173.   protected boolean certificateStrictVerification = false;

  174.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  175.   @XmlAttribute(name="token-policy",required=false)
  176.   protected java.lang.String tokenPolicy;

  177. }