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 * OAuth 2.0 client authorized to use the ID Token as an OAuth access token, 011 * if different than the client that requested the ID Token ({@code azp}). It 012 * must contain the {@link com.nimbusds.oauth2.sdk.id.ClientID client 013 * identifier} of the authorised party. 014 * 015 * <p>The client identifier can be a URL or an arbitrary string. This class is 016 * immutable. 017 * 018 * <p>See also {@link com.nimbusds.oauth2.sdk.id.ClientID}. 019 * 020 * <p>Related specifications: 021 * 022 * <ul> 023 * <li>OpenID Connect Messages 1.0, section 2.1.2.1. 024 * <li>OAuth 2.0 (RFC 6749), section 2.2. 025 * </ul> 026 * 027 * @author Vladimir Dzhuvinov 028 */ 029@Immutable 030public final class AuthorizedParty extends Identifier { 031 032 033 /** 034 * Creates a new authorised party identifier with the specified value. 035 * 036 * @param value The authorised party identifier value. Must not be 037 * {@code null}. 038 */ 039 public AuthorizedParty(final String value) { 040 041 super(value); 042 } 043 044 045 @Override 046 public boolean equals(final Object object) { 047 048 return object instanceof AuthorizedParty && 049 this.toString().equals(object.toString()); 050 } 051}