001 package com.nimbusds.openid.connect.sdk.claims; 002 003 004 import net.jcip.annotations.Immutable; 005 006 import 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 URL string. This class is 014 * immutable. 015 * 016 * <p>Related specifications: 017 * 018 * <ul> 019 * <li>OpenID Connect Messages 1.0, section 2.1.2.1. 020 * </ul> 021 * 022 * @author Vladimir Dzhuvinov 023 */ 024 @Immutable 025 public final class AMR extends Identifier { 026 027 028 /** 029 * Creates a new Authentication Method Reference (AMR) with the 030 * specified value. 031 * 032 * @param value The AMR value. Must not be {@code null}. 033 */ 034 public AMR(final String value) { 035 036 super(value); 037 } 038 039 040 @Override 041 public boolean equals(final Object object) { 042 043 return object != null && 044 object instanceof AMR && 045 this.toString().equals(object.toString()); 046 } 047 }