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