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; 019 020 021import net.jcip.annotations.Immutable; 022 023import com.nimbusds.oauth2.sdk.id.Identifier; 024 025 026/** 027 * Identity assurance level. 028 * 029 * <p>Related specifications: 030 * 031 * <ul> 032 * <li>OpenID Connect for Identity Assurance 1.0 033 * </ul> 034 */ 035@Immutable 036public final class IdentityAssuranceLevel extends Identifier { 037 038 039 private static final long serialVersionUID = 378614456182831323L; 040 041 042 /** 043 * Very low confidence/assurance in the identity. 044 */ 045 public static final IdentityAssuranceLevel VERY_LOW = new IdentityAssuranceLevel("very_low"); 046 047 048 /** 049 * Low confidence/assurance in the identity. Used in eIDAS & UK 050 * TFIDA. 051 */ 052 public static final IdentityAssuranceLevel LOW = new IdentityAssuranceLevel("low"); 053 054 055 /** 056 * Medium confidence/assurance in the identity. Used in UK TFIDA. 057 */ 058 public static final IdentityAssuranceLevel MEDIUM = new IdentityAssuranceLevel("medium"); 059 060 061 /** 062 * Substantial confidence/assurance in the identity. Used in eIDAS. 063 */ 064 public static final IdentityAssuranceLevel SUBSTANTIAL = new IdentityAssuranceLevel("substantial"); 065 066 067 /** 068 * High confidence/assurance in the identity. Used in eIDAS & UK 069 * TFIDA. 070 */ 071 public static final IdentityAssuranceLevel HIGH = new IdentityAssuranceLevel("high"); 072 073 074 /** 075 * Very high confidence/assurance in the identity. Used in UK TFIDA. 076 */ 077 public static final IdentityAssuranceLevel VERY_HIGH = new IdentityAssuranceLevel("very_high"); 078 079 080 /** 081 * No link between the user and a specific real-life identity. Used in US NIST-800-63-3. 082 */ 083 public static final IdentityAssuranceLevel IAL1 = new IdentityAssuranceLevel("ial1"); 084 085 086 /** 087 * A real-world existence of the claimed identity and verifies that the 088 * user is appropriately associated with it. Used in US NIST-800-63-3. 089 */ 090 public static final IdentityAssuranceLevel IAL2 = new IdentityAssuranceLevel("ial2"); 091 092 093 /** 094 * Identity of the user proven by physical presence by an authorized 095 * and trained representative. Used in US NIST-800-63-3. 096 */ 097 public static final IdentityAssuranceLevel IAL3 = new IdentityAssuranceLevel("ial3"); 098 099 100 /** 101 * An assurance level that is, or equivalent to, a one-time code sent 102 * via mail to the address of the owner of the claims. Used in SE 103 * BankID. 104 */ 105 public static final IdentityAssuranceLevel AL2 = new IdentityAssuranceLevel("al2"); 106 107 108 /** 109 * An assurance level that is, or equivalent to, a in person 110 * verification with an ID document, but provided remotely. Used in SE 111 * BankID. 112 */ 113 public static final IdentityAssuranceLevel AL3 = new IdentityAssuranceLevel("al3"); 114 115 116 /** 117 * Creates a new identity assurance level. 118 * 119 * @param value The identity assurance level value. Must not be 120 * {@code null}. 121 */ 122 public IdentityAssuranceLevel(final String value) { 123 super(value); 124 } 125 126 127 @Override 128 public boolean equals(final Object object) { 129 130 return object instanceof IdentityAssuranceLevel && 131 this.toString().equals(object.toString()); 132 } 133}