All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.edu.icm.unity.oauth.as.webauthz.ClaimsInTokenAttribute Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2021 Bixbit - Krzysztof Benedyczak. All rights reserved.
 * See LICENCE.txt file for licensing information.
 */

package pl.edu.icm.unity.oauth.as.webauthz;

import java.util.Collections;
import java.util.Set;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

@JsonDeserialize(builder = ClaimsInTokenAttribute.Builder.class)
public class ClaimsInTokenAttribute
{
	static final String PARAMETER_NAME = "claims_in_tokens";

	public enum Value
	{
		id_token, token
	}

	public final Set values;

	private ClaimsInTokenAttribute(Builder builder)
	{
		this.values = Set.copyOf(builder.values);
	}

	public static Builder builder()
	{
		return new Builder();
	}

	public static final class Builder
	{
		private Set values = Collections.emptySet();

		private Builder()
		{
		}

		public Builder withValues(Set values)
		{
			this.values = values;
			return this;
		}

		public ClaimsInTokenAttribute build()
		{
			return new ClaimsInTokenAttribute(this);
		}
	}

	
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy