001/* 002 * oauth2-oidc-sdk 003 * 004 * Copyright 2012-2020, Connect2id Ltd and contributors. 005 * 006 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use 007 * this file except in compliance with the License. You may obtain a copy of the 008 * License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software distributed 013 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 014 * CONDITIONS OF ANY KIND, either express or implied. See the License for the 015 * specific language governing permissions and limitations under the License. 016 */ 017 018package com.nimbusds.openid.connect.sdk.federation.entities; 019 020 021import net.jcip.annotations.Immutable; 022 023import com.nimbusds.oauth2.sdk.id.Identifier; 024 025 026/** 027 * Federation metadata type. 028 * 029 * <p>Related specifications: 030 * 031 * <ul> 032 * <li>OpenID Connect Federation 1.0, section 3. 033 * </ul> 034 */ 035@Immutable 036public final class FederationMetadataType extends Identifier { 037 038 039 private static final long serialVersionUID = 345842707286531482L; 040 041 042 /** 043 * OpenID relying party ({@code openid_relying_party}). 044 */ 045 public static final FederationMetadataType OPENID_RELYING_PARTY = new FederationMetadataType("openid_relying_party"); 046 047 048 /** 049 * OpenID provider ({@code openid_provider}). 050 */ 051 public static final FederationMetadataType OPENID_PROVIDER = new FederationMetadataType("openid_provider"); 052 053 054 /** 055 * OAuth authorisation server ({@code oauth_authorization_server}). 056 */ 057 public static final FederationMetadataType OAUTH_AUTHORIZATION_SERVER = new FederationMetadataType("oauth_authorization_server"); 058 059 060 /** 061 * OAuth client ({@code oauth_client}). 062 */ 063 public static final FederationMetadataType OAUTH_CLIENT = new FederationMetadataType("oauth_client"); 064 065 066 /** 067 * OAuth protected resource ({@code oauth_resource}). 068 */ 069 public static final FederationMetadataType OAUTH_RESOURCE = new FederationMetadataType("oauth_resource"); 070 071 072 /** 073 * Federation entity ({@code federation_entity}). 074 */ 075 public static final FederationMetadataType FEDERATION_ENTITY = new FederationMetadataType("federation_entity"); 076 077 078 /** 079 * Creates a new federation metadata type. 080 * 081 * @param value The metadata type value. Must not be {@code null}. 082 */ 083 public FederationMetadataType(final String value) { 084 super(value); 085 } 086 087 088 @Override 089 public boolean equals(final Object object) { 090 091 return object instanceof FederationMetadataType && 092 this.toString().equals(object.toString()); 093 } 094}