001package com.nimbusds.openid.connect.sdk.claims; 002 003 004import net.jcip.annotations.Immutable; 005 006import com.nimbusds.oauth2.sdk.id.Identifier; 007 008 009/** 010 * Authentication Method Reference ({@code amr}). It identifies the method 011 * used in authentication. 012 * 013 * <p>The AMR is represented by a string or an URI string. 014 * 015 * <p>Related specifications: 016 * 017 * <ul> 018 * <li>OpenID Connect Core 1.0, section 2. 019 * </ul> 020 */ 021@Immutable 022public final class AMR extends Identifier { 023 024 025 /** 026 * Retina scan biometric. 027 */ 028 public static final AMR EYE = new AMR("eye"); 029 030 031 /** 032 * Fingerprint biometric. 033 */ 034 public static final AMR FPT = new AMR("fpt"); 035 036 037 /** 038 * Knowledge-based authentication (see NIST.800-63-2). 039 */ 040 public static final AMR KBA = new AMR("kba"); 041 042 043 /** 044 * Multiple-channel authentication. The authentication involves 045 * communication over more than one distinct channel. 046 */ 047 public static final AMR MCA = new AMR("mca"); 048 049 050 /** 051 * Multiple-factor authentication (see NIST.800-63-2). When this is 052 * present, specific authentication methods used may also be included. 053 */ 054 public static final AMR MFA = new AMR("mfa"); 055 056 057 /** 058 * One-time password. One-time password specifications that this 059 * authentication method applies to include RFC 4226 and RFC 6238. 060 */ 061 public static final AMR OTP = new AMR("otp"); 062 063 064 /** 065 * Proof-of-possession (PoP) of a key. See Appendix C of RFC 4211 for a 066 * discussion on PoP. 067 */ 068 public static final AMR POP = new AMR("pop"); 069 070 071 /** 072 * Password-based authentication. 073 */ 074 public static final AMR PWD = new AMR("pwd"); 075 076 077 /** 078 * Risk-based authentication. See <a href="http://utica.edu/academic/institutes/ecii/publications/articles/51D6D996-90F2-F468-AC09C4E8071575AE.pdf">Enhanced 079 * Authentication In Online Banking</a>, Journal of Economic Crime 080 * Management 4.2: 18-19, 2006. 081 */ 082 public static final AMR RBA = new AMR("rba"); 083 084 085 /** 086 * Smart card. 087 */ 088 public static final AMR SC = new AMR("sc"); 089 090 091 /** 092 * Confirmation by SMS reply. 093 */ 094 public static final AMR SMS = new AMR("sms"); 095 096 097 /** 098 * Confirmation by telephone call. 099 */ 100 public static final AMR TEL = new AMR("tel"); 101 102 103 /** 104 * User presence test. 105 */ 106 public static final AMR USER = new AMR("user"); 107 108 109 /** 110 * Voice biometric. 111 */ 112 public static final AMR VBM = new AMR("vbm"); 113 114 115 /** 116 * Windows integrated authentication. See 117 * <a href="http://blogs.msdn.com/b/benjaminperkins/archive/2011/09/14/iis-integrated-windows-authentication-with-negotiate.aspx">Integrated 118 * Windows Authentication with Negotiate</a>, September 2011. 119 */ 120 public static final AMR WIA = new AMR("wia"); 121 122 123 124 /** 125 * Creates a new Authentication Method Reference (AMR) with the 126 * specified value. 127 * 128 * @param value The AMR value. Must not be {@code null}. 129 */ 130 public AMR(final String value) { 131 132 super(value); 133 } 134 135 136 @Override 137 public boolean equals(final Object object) { 138 139 return object instanceof AMR && 140 this.toString().equals(object.toString()); 141 } 142}