Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
Urbanite UI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
URBANITE
Open
Urbanite UI
Commits
56d7c7f6
Commit
56d7c7f6
authored
4 years ago
by
Callari, Roberto
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
c9a9ac11
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
package-lock.json
+25
-4
25 additions, 4 deletions
package-lock.json
package.json
+1
-0
1 addition, 0 deletions
package.json
src/app/app.module.ts
+4
-3
4 additions, 3 deletions
src/app/app.module.ts
src/app/oauth/services/token.interceptor.ts
+4
-0
4 additions, 0 deletions
src/app/oauth/services/token.interceptor.ts
with
34 additions
and
7 deletions
package-lock.json
+
25
−
4
View file @
56d7c7f6
...
...
@@ -16974,6 +16974,14 @@
"tough-cookie": "~2.3.0",
"tunnel-agent": "^0.6.0",
"uuid": "^3.0.0"
},
"dependencies": {
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
"dev": true
}
}
},
"require-directory": {
...
...
@@ -18161,6 +18169,14 @@
"requires": {
"faye-websocket": "^0.10.0",
"uuid": "^3.0.1"
},
"dependencies": {
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
"dev": true
}
}
},
"sockjs-client": {
...
...
@@ -20515,6 +20531,12 @@
"psl": "^1.1.28",
"punycode": "^2.1.1"
}
},
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
"dev": true
}
}
},
...
...
@@ -20781,10 +20803,9 @@
"dev": true
},
"uuid": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz",
"integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==",
"dev": true
"version": "8.3.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz",
"integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg=="
},
"v8flags": {
"version": "3.0.1",
...
...
This diff is collapsed.
Click to expand it.
package.json
+
1
−
0
View file @
56d7c7f6
...
...
@@ -80,6 +80,7 @@
"
tinymce
"
:
"
4.5.7
"
,
"
tslib
"
:
"
^1.13.0
"
,
"
typeface-exo
"
:
"
0.0.22
"
,
"
uuid
"
:
"
^8.3.1
"
,
"
web-animations-js
"
:
"
^2.3.2
"
,
"
zone.js
"
:
"
^0.10.3
"
},
...
...
This diff is collapsed.
Click to expand it.
src/app/app.module.ts
+
4
−
3
View file @
56d7c7f6
...
...
@@ -29,6 +29,7 @@ import { UserInformationService } from './oauth/services/user-information.servic
import
{
TokenInterceptor
}
from
'
./oauth/services/token.interceptor
'
;
import
{
AuthGuard
}
from
'
./oauth/services/auth.guard
'
;
import
{
NbOauth2LogoutComponent
}
from
'
./oauth/nb-oauth2-logout/nb-oauth2-logout.component
'
;
import
{
v4
as
uuidv4
}
from
'
uuid
'
;
export
function
configFactory
(
http
:
HttpClient
):
ConfigLoader
{
return
new
ConfigHttpLoader
(
http
,
'
./assets/config.json
'
);
...
...
@@ -69,8 +70,8 @@ export function createTranslateLoader(http: HttpClient) {
strategies
:
[
NbOAuth2AuthStrategy
.
setup
({
name
:
'
idm
'
,
clientId
:
'
d3f0bbb0-6846-446a-bce4-2755ad9adcd2
'
,
clientSecret
:
'
596
25d70-a36b-40e7-a927-314b1346c3bb
'
,
clientId
:
'
b5d2fe98-3d01-4b93-b54c-acbb60772479
'
,
clientSecret
:
'
1
596
4f9e-b7e3-4816-bb93-548488cfaca5
'
,
baseEndpoint
:
'
http://192.168.99.100:3000/oauth2/
'
,
clientAuthMethod
:
NbOAuth2ClientAuthMethod
.
BASIC
,
token
:
{
...
...
@@ -78,7 +79,7 @@ export function createTranslateLoader(http: HttpClient) {
class
:
NbAuthOAuth2Token
},
authorize
:
{
state
:
"
asd
"
,
state
:
uuidv4
()
,
redirectUri
:
'
http://localhost:4200/auth/callback
'
,
},
redirect
:
{
...
...
This diff is collapsed.
Click to expand it.
src/app/oauth/services/token.interceptor.ts
+
4
−
0
View file @
56d7c7f6
...
...
@@ -19,6 +19,10 @@ export class TokenInterceptor implements HttpInterceptor {
return
next
.
handle
(
req
);
}
if
(
req
.
url
.
indexOf
(
'
/oauth2/token
'
)
>
-
1
)
{
return
next
.
handle
(
req
);
}
this
.
auth
.
getToken
().
subscribe
((
x
:
NbAuthOAuth2Token
)
=>
this
.
token
=
x
);
let
newHeaders
=
req
.
headers
;
if
(
this
.
token
.
getPayload
()
!=
null
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment