()
| 80 | } |
| 81 | |
| 82 | func (v *applicationView) KeyValues() [][]string { |
| 83 | callbacks := strings.Join(v.Callbacks, ", ") |
| 84 | allowedOrigins := strings.Join(v.AllowedOrigins, ", ") |
| 85 | allowedWebOrigins := strings.Join(v.AllowedWebOrigins, ", ") |
| 86 | allowedLogoutURLs := strings.Join(v.AllowedLogoutURLs, ", ") |
| 87 | grants := strings.Join(v.Grants, ", ") |
| 88 | metadata := strings.Join(v.Metadata, ", ") |
| 89 | |
| 90 | var keyValues [][]string |
| 91 | |
| 92 | if v.revealSecret { |
| 93 | keyValues = [][]string{ |
| 94 | {"CLIENT ID", ansi.Faint(v.ClientID)}, |
| 95 | {"NAME", v.Name}, |
| 96 | {"DESCRIPTION", v.Description}, |
| 97 | {"TYPE", ApplyColorToFriendlyAppType(v.Type)}, |
| 98 | {"CLIENT SECRET", ansi.Italic(v.ClientSecret)}, |
| 99 | {"CALLBACKS", callbacks}, |
| 100 | {"ALLOWED LOGOUT URLS", allowedLogoutURLs}, |
| 101 | {"ALLOWED ORIGINS", allowedOrigins}, |
| 102 | {"ALLOWED WEB ORIGINS", allowedWebOrigins}, |
| 103 | {"TOKEN ENDPOINT AUTH", v.AuthMethod}, |
| 104 | {"GRANTS", grants}, |
| 105 | {"METADATA", metadata}, |
| 106 | {"REFRESH TOKEN", v.RefreshToken}, |
| 107 | } |
| 108 | } else { |
| 109 | keyValues = [][]string{ |
| 110 | {"CLIENT ID", ansi.Faint(v.ClientID)}, |
| 111 | {"NAME", v.Name}, |
| 112 | {"DESCRIPTION", v.Description}, |
| 113 | {"TYPE", ApplyColorToFriendlyAppType(v.Type)}, |
| 114 | {"CALLBACKS", callbacks}, |
| 115 | {"ALLOWED LOGOUT URLS", allowedLogoutURLs}, |
| 116 | {"ALLOWED ORIGINS", allowedOrigins}, |
| 117 | {"ALLOWED WEB ORIGINS", allowedWebOrigins}, |
| 118 | {"TOKEN ENDPOINT AUTH", v.AuthMethod}, |
| 119 | {"GRANTS", grants}, |
| 120 | {"METADATA", metadata}, |
| 121 | {"REFRESH TOKEN", v.RefreshToken}, |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | // Add resource server identifier if present. |
| 126 | if v.ResourceServerIdentifier != "" { |
| 127 | keyValues = append(keyValues, []string{"RESOURCE SERVER IDENTIFIER", v.ResourceServerIdentifier}) |
| 128 | } |
| 129 | |
| 130 | if len(v.AllowAnyProfileOfType) > 0 { |
| 131 | keyValues = append(keyValues, []string{"TOKEN EXCHANGE TYPES", strings.Join(v.AllowAnyProfileOfType, ", ")}) |
| 132 | } |
| 133 | |
| 134 | if v.IsFirstParty != nil { |
| 135 | keyValues = append(keyValues, []string{"IS FIRST PARTY", boolean(*v.IsFirstParty)}) |
| 136 | } |
| 137 | |
| 138 | if v.ThirdPartySecurityMode != "" { |
| 139 | keyValues = append(keyValues, []string{"THIRD PARTY SECURITY MODE", v.ThirdPartySecurityMode}) |
nothing calls this directly
no test coverage detected