001package com.nimbusds.oauth2.sdk.id; 002 003 004import java.util.UUID; 005 006 007/** 008 * Identifier for an OAuth 2.0 client software. 009 * 010 * <p>Related specifications: 011 * 012 * <ul> 013 * <li>OAuth 2.0 Dynamic Client Registration Protocol 014 * (draft-ietf-oauth-dyn-reg-14), section 2. 015 * </ul> 016 * 017 * @author Vladimir Dzhuvinov 018 */ 019public class SoftwareID extends Identifier { 020 021 022 /** 023 * Creates a new OAuth 2.0 client software identifier with the 024 * specified value. 025 * 026 * @param value The software identifier value. Must not be {@code null} 027 * or empty string. 028 */ 029 public SoftwareID(final String value) { 030 031 super(value); 032 } 033 034 035 /** 036 * Creates a new OAuth 2.0 client software that is a type 4 UUID. 037 */ 038 public SoftwareID() { 039 040 this(UUID.randomUUID().toString()); 041 } 042 043 044 @Override 045 public boolean equals(final Object object) { 046 047 return object instanceof SoftwareID && 048 this.toString().equals(object.toString()); 049 } 050}