001/*
002 * oauth2-oidc-sdk
003 *
004 * Copyright 2012-2021, 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 * The type of method used to validate the authenticity of an evidence.
028 *
029 * <p>Related specifications:
030 *
031 * <ul>
032 *     <li>OpenID Connect for Identity Assurance 1.0, section 5.1.1.
033 *     <li>https://bitbucket.org/openid/ekyc-ida/wiki/identifiers
034 * </ul>
035 */
036@Immutable
037public final class ValidationMethodType extends Identifier {
038        
039        
040        private static final long serialVersionUID = -6994497310463726386L;
041        
042        
043        /**
044         * Validation that physical evidence is genuine through inspection of
045         * its physical properties in person.
046         */
047        public static final ValidationMethodType VPIP = new ValidationMethodType("vpip");
048        
049        
050        /**
051         * Validation that physical evidence is genuine through inspection of
052         * its physical properties in person including its optical
053         * characteristics under non-visible light.
054         */
055        public static final ValidationMethodType VPIRUV = new ValidationMethodType("vpiruv");
056        
057        
058        /**
059         * Validation that physical evidence is genuine through the inspection
060         * of an image taken remotely under visible light.
061         */
062        public static final ValidationMethodType VRI = new ValidationMethodType("vri");
063        
064        
065        /**
066         * Validation that digital/electronic evidence is genuine by the
067         * inspection of its properties and content.
068         */
069        public static final ValidationMethodType VDIG = new ValidationMethodType("vdig");
070        
071        
072        /**
073         * Validation the cryptographic security features of the evidence are
074         * intact and correct.
075         */
076        public static final ValidationMethodType VCRYPT = new ValidationMethodType("vcrypt");
077        
078        
079        /**
080         * Found an existing electronic record that matches the claims made by
081         * the user.
082         */
083        public static final ValidationMethodType DATA = new ValidationMethodType("data");
084        
085        
086        /**
087         * Creates a new validation method type.
088         *
089         * @param value The validation method type value. Must not be
090         *              {@code null}.
091         */
092        public ValidationMethodType(final String value) {
093                super(value);
094        }
095        
096        
097        @Override
098        public boolean equals(final Object object) {
099                
100                return object instanceof ValidationMethodType &&
101                        this.toString().equals(object.toString());
102        }
103}