Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Genesys Website
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
19
Issues
19
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Website
Commits
9e9ee707
Commit
9e9ee707
authored
Jan 27, 2019
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edit and display allowed CORS origins for OAuth clients
parent
3d02490e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
0 deletions
+10
-0
locales/en/translations.json
locales/en/translations.json
+2
-0
src/model/oauth/OAuthClient.ts
src/model/oauth/OAuthClient.ts
+1
-0
src/user/translations.json
src/user/translations.json
+2
-0
src/user/ui/admin/c/OAuthClientCard.tsx
src/user/ui/admin/c/OAuthClientCard.tsx
+4
-0
src/user/ui/admin/c/OAuthClientForm.tsx
src/user/ui/admin/c/OAuthClientForm.tsx
+1
-0
No files found.
locales/en/translations.json
View file @
9e9ee707
...
...
@@ -2002,6 +2002,8 @@
},
"roleLabel"
:
"User roles"
,
"oAuth"
:
{
"allowedOrigins"
:
"Allowed CORS origins"
,
"autoApproveScopes"
:
"Auto-approved scopes"
,
"clientId"
:
"clientId"
,
"clientTitle"
:
"Title"
,
"accessTokenValidity"
:
"Access token validity"
,
...
...
src/model/oauth/OAuthClient.ts
View file @
9e9ee707
...
...
@@ -30,6 +30,7 @@ class OAuthClient {
public
refreshTokenValidity
:
number
;
public
refreshTokenValiditySeconds
:
number
;
public
registeredRedirectUri
:
string
[];
public
allowedOrigins
:
string
[];
public
resourceIds
:
string
[];
public
roles
:
string
[];
public
scoped
:
boolean
;
...
...
src/user/translations.json
View file @
9e9ee707
...
...
@@ -153,6 +153,8 @@
},
"roleLabel"
:
"User roles"
,
"oAuth"
:
{
"allowedOrigins"
:
"Allowed CORS origins"
,
"autoApproveScopes"
:
"Auto-approved scopes"
,
"clientId"
:
"clientId"
,
"clientTitle"
:
"Title"
,
"accessTokenValidity"
:
"Access token validity"
,
...
...
src/user/ui/admin/c/OAuthClientCard.tsx
View file @
9e9ee707
...
...
@@ -35,6 +35,9 @@ const OAuthClientCard = ({ compact = false, oAuthClient, removeSecretRequest, in
<
div
>
{
oAuthClient
.
description
}
</
div
>
<
div
>
{
oAuthClient
.
allowedOrigins
&&
oAuthClient
.
allowedOrigins
.
map
((
uri
,
i
)
=>
<
span
key
=
{
uri
+
i
}
className
=
"pr-5"
>
{
uri
}
</
span
>)
}
</
div
>
</
CardContent
>
</
Card
>
)
:
(
...
...
@@ -58,6 +61,7 @@ const OAuthClientCard = ({ compact = false, oAuthClient, removeSecretRequest, in
{
oAuthClient
.
registeredRedirectUri
&&
oAuthClient
.
registeredRedirectUri
.
length
>
0
&&
<
PropertiesItem
title
=
{
t
(
'
user.common.oAuth.redirectUris
'
)
}
>
{
oAuthClient
.
registeredRedirectUri
.
map
((
uri
,
i
)
=>
<
div
key
=
{
uri
+
i
}
className
=
"mb-5"
>
{
uri
}
</
div
>)
}
</
PropertiesItem
>
}
<
PropertiesItem
title
=
{
t
(
'
user.common.oAuth.allowedOrigins
'
)
}
>
{
oAuthClient
.
allowedOrigins
&&
oAuthClient
.
allowedOrigins
.
map
((
uri
,
i
)
=>
<
div
key
=
{
uri
+
i
}
className
=
"mb-5"
>
{
uri
}
</
div
>)
}
</
PropertiesItem
>
{
oAuthClient
.
resourceIds
&&
oAuthClient
.
resourceIds
.
length
>
0
&&
<
PropertiesItem
title
=
{
t
(
'
user.common.oAuth.resourceIds
'
)
}
>
{
oAuthClient
.
resourceIds
.
map
((
id
,
i
)
=>
<
div
key
=
{
id
+
i
}
className
=
"mb-5"
>
{
id
}
</
div
>)
}
</
PropertiesItem
>
}
...
...
src/user/ui/admin/c/OAuthClientForm.tsx
View file @
9e9ee707
...
...
@@ -68,6 +68,7 @@ class UserForm extends React.Component<any, any> {
validate
=
{
[
Validators
.
decimalNumber
]
}
/>
<
ItemsEditor
name
=
"registeredRedirectUri"
itemLabel
=
{
t
(
'
user.common.oAuth.redirectUris
'
)
}
addItem
=
{
console
.
log
}
removeItem
=
{
console
.
log
}
component
=
{
stringField
}
/>
<
ItemsEditor
name
=
"allowedOrigins"
itemLabel
=
{
t
(
'
user.common.oAuth.allowedOrigins
'
)
}
addItem
=
{
console
.
log
}
removeItem
=
{
console
.
log
}
component
=
{
stringField
}
/>
<
FieldArray
name
=
"authorizedGrantTypes"
options
=
{
OAuthClient
.
AVAILABLE_GRANT_TYPES
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment