001package com.nimbusds.oauth2.sdk.token; 002 003 004import java.util.Collections; 005import java.util.Set; 006 007import net.jcip.annotations.Immutable; 008import net.minidev.json.JSONObject; 009 010 011/** 012 * Typeless (generic) token. 013 */ 014@Immutable 015public class TypelessToken extends Token { 016 017 018 private static final long serialVersionUID = 1477117093355749547L; 019 020 021 /** 022 * Creates a new typeless token with the specified value. 023 * 024 * @param value The token value. Must not be {@code null} or empty 025 * string. 026 */ 027 public TypelessToken(final String value) { 028 super(value); 029 } 030 031 032 @Override 033 public Set<String> getParameterNames() { 034 return Collections.emptySet(); 035 } 036 037 038 @Override 039 public JSONObject toJSONObject() { 040 return new JSONObject(); 041 } 042}