001/*
002 * oauth2-oidc-sdk
003 *
004 * Copyright 2012-2023, 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.oauth2.sdk.rar;
019
020import com.nimbusds.oauth2.sdk.id.IdentifierWithOptionalURIRepresentation;
021import net.jcip.annotations.Immutable;
022
023import java.net.URI;
024
025
026/**
027 * OAuth 2.0 Rich Authorisation Request (RAR) detail type.
028 *
029 * <p>Related specifications:
030 *
031 * <ul>
032 *     <li>OAuth 2.0 Rich Authorization Requests (RFC 9396), section 2.
033 * </ul>
034 */
035@Immutable
036public final class AuthorizationType extends IdentifierWithOptionalURIRepresentation {
037
038
039        private static final long serialVersionUID = 741864278569413848L;
040
041
042        /**
043         * Creates a new authorisation type.
044         *
045         * @param value The type value. Must not be {@code null}.
046         */
047        public AuthorizationType(final String value) {
048                super(value);
049        }
050
051
052        /**
053         * Creates a new authorisation type.
054         *
055         * @param uri The type value as URI. Must not be {@code null}.
056         */
057        public AuthorizationType(final URI uri) {
058                super(uri);
059        }
060
061
062        @Override
063        public boolean equals(final Object object) {
064                return object instanceof AuthorizationType && this.toString().equals(object.toString());
065        }
066}