001/*- 002 * #%L 003 * Smile CDR - CDR 004 * %% 005 * Copyright (C) 2016 - 2024 Smile CDR, Inc. 006 * %% 007 * All rights reserved. 008 * #L% 009 */ 010package ca.cdr.api.model.json; 011 012import jakarta.annotation.Nonnull; 013import jakarta.annotation.Nullable; 014 015import java.util.Set; 016 017public interface IOAuth2ClientDetails { 018 /** 019 * This PID (persistent ID) for this client. This is the internal database 020 * ID for the client and is globally unique across the smile CDR cluster. 021 */ 022 Long getPid(); 023 024 /** 025 * The node ID that this client is registered against. 026 */ 027 String getNodeId(); 028 029 /** 030 * The module ID that this client is registered against. 031 */ 032 String getModuleId(); 033 034 /** 035 * The client ID (used as a primary key, and as a parameter during auth exchange) 036 */ 037 @Nonnull 038 String getClientId(); 039 040 /** 041 * The client's name (used only for display purposes, may be shown to end users) 042 */ 043 @Nullable 044 String getClientName(); 045 046 /** 047 * Allowable redirect URIs the client can specify as a part of an auth exchange 048 */ 049 @Nonnull 050 Set<String> getRegisteredRedirectUri(); 051 052 /** 053 * Scopes that the client is allowed to request? 054 * Callers should not modify the returned collection. 055 */ 056 @Nonnull 057 Set<String> getScope(); 058 059 /** 060 * Any scopes that will be automatically approved if the client requests them 061 * during authorization, without prompting the user. 062 * Callers should not modify the returned collection. 063 */ 064 @Nonnull 065 Set<String> getAutoApproveScopes(); 066 067 /** 068 * Any scopes that will be automatically granted to the client even if it does 069 * not request them. 070 * Callers should not modify the returned collection. 071 */ 072 @Nonnull 073 Set<String> getAutoGrantScopes(); 074 075 /** 076 * Does the client require a client secret in order to authenticate? 077 */ 078 boolean isSecretRequired(); 079 080 /** 081 * Is the client enabled? 082 */ 083 boolean isEnabled(); 084 085 /** 086 * Was this client created by AppSphere 087 */ 088 boolean isCreatedByAppSphere(); 089 090 /** 091 * The client's public JWKS 092 */ 093 @Nullable 094 String getPublicJwks(); 095}