001/*
002 * oauth2-oidc-sdk
003 *
004 * Copyright 2012-2016, 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.assurance.evidences;
019
020
021import net.jcip.annotations.Immutable;
022
023import com.nimbusds.oauth2.sdk.id.Identifier;
024
025
026/**
027 * Identity document type.
028 *
029 * <p>Related specifications:
030 *
031 * <ul>
032 *     <li>OpenID Connect for Identity Assurance 1.0, sections 5.1.1.1 and
033 *         14.
034 *     <li>https://bitbucket.org/openid/ekyc-ida/wiki/identifiers
035 * </ul>
036 */
037@Immutable
038public final class DocumentType extends Identifier {
039        
040        
041        private static final long serialVersionUID = -6631671451012338520L;
042        
043        
044        /**
045         * An identity document issued by a country's government for the
046         * purpose of identifying a citizen.
047         */
048        public static final DocumentType IDCARD = new DocumentType("idcard");
049        
050        
051        /**
052         * A passport is a travel document, usually issued by a country's
053         * government, that certifies the identity and nationality of its
054         * holder primarily for the purpose of international
055         * travel.
056         */
057        public static final DocumentType PASSPORT = new DocumentType("passport");
058        
059        
060        /**
061         * Official document permitting an individual to operate motorized
062         * vehicles. In the absence of a formal identity document, a driver's
063         * license may be accepted in many countries for identity verification.
064         */
065        public static final DocumentType DRIVING_PERMIT = new DocumentType("driving_permit");
066        
067        
068        /**
069         * Official document permitting an individual to reside within a
070         * particular jurisdiction.
071         */
072        public static final DocumentType RESIDENCE_PERMIT = new DocumentType("residence_permit");
073        
074        
075        /**
076         * ID Card issued by the German government to foreign nationals.
077         */
078        public static final DocumentType DE_IDCARD_FOREIGNERS = new DocumentType("de_idcard_foreigners");
079        
080        
081        /**
082         * ID Card issued by the German government to foreign nationals as
083         * passports replacement.
084         */
085        public static final DocumentType DE_EMERGENCY_IDCARD = new DocumentType("de_emergency_idcard");
086        
087        
088        /**
089         * Electronic Resident Permit issued by the German government to
090         * foreign nationals.
091         */
092        public static final DocumentType DE_ERP = new DocumentType("de_erp");
093        
094        
095        /**
096         * Electronic Resident Permit issued by the German government to
097         * foreign nationals as replacement for another identity document.
098         */
099        public static final DocumentType DE_ERP_REPLACEMENT_IDCARD = new DocumentType("de_erp_replacement_idcard");
100        
101        
102        /**
103         * ID Card issued by the German government to refugees as passports
104         * replacement.
105         */
106        public static final DocumentType DE_IDCARD_REFUGEES = new DocumentType("de_idcard_refugees");
107        
108        
109        /**
110         * ID Card issued by the German government to apatrids as passports
111         * replacement.
112         */
113        public static final DocumentType DE_IDCARD_APATRIDS = new DocumentType("de_idcard_apatrids");
114        
115        
116        /**
117         * Identity document issued by the German government to refugees in
118         * case of suspension of deportation that are marked as "ID Card
119         * replacement".
120         */
121        public static final DocumentType DE_CERTIFICATE_OF_SUSPENSION_OF_DEPORTATION = new DocumentType("de_certificate_of_suspension_of_deportation");
122        
123        
124        /**
125         * Permission to reside issued by the German government to foreign
126         * nationals applying for asylum.
127         */
128        public static final DocumentType DE_PERMISSION_TO_RESIDE = new DocumentType("de_permission_to_reside");
129        
130        
131        /**
132         * ID Card replacement document issued by the German government to
133         * foreign nationals (see Act on the Residence, Economic Activity and
134         * Integration of Foreigners in the Federal Territory, Residence Act,
135         * Appendix D1 ID Card replacement according to § 48 Abs. 2 i.V.m. §
136         * 78a Abs. 4).
137         */
138        public static final DocumentType DE_REPLACEMENT_IDCARD = new DocumentType("de_replacement_idcard");
139        
140        
141        /**
142         * Japanese drivers license.
143         */
144        public static final DocumentType JP_DRIVERS_LICENSE = new DocumentType("jp_drivers_license");
145        
146        
147        /**
148         * Japanese residence card for foreigners.
149         */
150        public static final DocumentType JP_RESIDENCY_CARD_FOR_FOREIGNER = new DocumentType("jp_residency_card_for_foreigner");
151        
152        
153        /**
154         * Japanese national ID card.
155         */
156        public static final DocumentType JP_INDIVIDUAL_NUMBER_CARD = new DocumentType("jp_individual_number_card");
157        
158        
159        /**
160         * Japanese special residency card for foreigners to permit permanent
161         * residence.
162         */
163        public static final DocumentType JP_PERMANENT_RESIDENCY_CARD_FOR_FOREIGNER = new DocumentType("jp_permanent_residency_card_for_foreigner");
164        
165        
166        /**
167         * Japanese health insurance card.
168         */
169        public static final DocumentType JP_HEALTH_INSURANCE_CARD = new DocumentType("jp_health_insurance_card");
170        
171        
172        /**
173         * Japanese residency card.
174         */
175        public static final DocumentType JP_RESIDENCY_CARD = new DocumentType("jp_residency_card");
176        
177        
178        /**
179         * Bank statement from a recognised banking institution.
180         */
181        public static final DocumentType BANK_STATEMENT = new DocumentType("bank_statement");
182        
183        
184        /**
185         * Statement from a recognised utility provider.
186         */
187        public static final DocumentType UTILITY_STATEMENT = new DocumentType("utility_statement");
188        
189        
190        /**
191         * Statement from a recognised mortgage provider.
192         */
193        public static final DocumentType MORTGAGE_STATEMENT = new DocumentType("mortgage_statement");
194        
195        
196        /**
197         * Statement from a recognised loan provider.
198         */
199        public static final DocumentType LOAN_STATEMENT = new DocumentType("loan_statement");
200        
201        
202        /**
203         * Statement from a country's tax authority.
204         */
205        public static final DocumentType TAX_STATEMENT = new DocumentType("tax_statement");
206        
207        
208        /**
209         * Statement from a country's social security authority.
210         */
211        public static final DocumentType SOCIAL_SECURITY_STATEMENT = new DocumentType("social_security_statement");
212        
213        
214        /**
215         * Official document permitting an individual to operate an aircraft.
216         */
217        public static final DocumentType PILOT_PERMIT = new DocumentType("pilot_permit");
218        
219        
220        /**
221         * Official document certifying the circumstances of a birth.
222         */
223        public static final DocumentType BIRTH_CERTIFICATE = new DocumentType("birth_certificate");
224        
225        
226        /**
227         * Official document certifying the circumstances of an adoption.
228         */
229        public static final DocumentType ADOPTION_CERTIFICATE = new DocumentType("adoption_certificate");
230        
231        
232        /**
233         * Official document certifying the circumstances of a marriage.
234         */
235        public static final DocumentType MARRIAGE_CERTIFICATE = new DocumentType("marriage_certificate");
236        
237        
238        /**
239         * Official document certifying that a person has satisfied the criteria for legal recognition in the acquired gender.
240         */
241        public static final DocumentType GENDER_CERTIFICATE = new DocumentType("gender_certificate");
242        
243        
244        /**
245         * Official document permitting an individual to use or own a firearm.
246         */
247        public static final DocumentType FIREARM_PERMIT = new DocumentType("firearm_permit");
248        
249        
250        /**
251         * Document certifying that a person has received specific education or has passed a test or series of tests.
252         */
253        public static final DocumentType EDUCATION_CERTIFICATE = new DocumentType("education_certificate");
254        
255        
256        /**
257         * Document that grants the holder official permission to enter, leave
258         * or stay in a country.
259         */
260        public static final DocumentType VISA = new DocumentType("visa");
261        
262        
263        /**
264         *An official military identity document issued by a country's government to its service personnel.
265         */
266        public static final DocumentType MILITARY_ID = new DocumentType("military_id");
267        
268        
269        /**
270         * An official voter identity document.
271         */
272        public static final DocumentType VOTER_ID = new DocumentType("voter_id");
273        
274        
275        /**
276         * Creates a new identity document type.
277         *
278         * @param value The identity document type value. Must not be
279         *              {@code null}.
280         */
281        public DocumentType(final String value) {
282                super(value);
283        }
284        
285        
286        @Override
287        public boolean equals(final Object object) {
288                
289                return object instanceof DocumentType &&
290                        this.toString().equals(object.toString());
291        }
292}