Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hpc-team
strudelv2_spa
Commits
8f276315
Commit
8f276315
authored
Jul 25, 2019
by
Chris Hines
Browse files
still having login problems
parent
90f314bf
Pipeline
#7541
passed with stages
in 3 minutes and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/authorisation.service.ts
View file @
8f276315
...
@@ -153,10 +153,10 @@ export class AuthorisationService {
...
@@ -153,10 +153,10 @@ export class AuthorisationService {
// this.router.navigate(['/']);
// this.router.navigate(['/']);
//Verify that the state matched the nonce we used when initiating login
//Verify that the state matched the nonce we used when initiating login
let
tuple
=
JSON
.
parse
(
local
Storage
.
getItem
(
'
authservice
'
));
let
tuple
=
JSON
.
parse
(
session
Storage
.
getItem
(
'
authservice
'
));
if
(
tuple
==
null
)
{
if
(
tuple
==
null
)
{
console
.
log
(
'
token found, but no authService defined
'
);
console
.
log
(
'
token found, but no authService defined
'
);
let
data
=
local
Storage
.
getItem
(
'
authservice
'
);
let
data
=
session
Storage
.
getItem
(
'
authservice
'
);
console
.
log
(
data
);
console
.
log
(
data
);
return
return
}
}
...
@@ -235,7 +235,7 @@ public getKeys(id?: Identity) {
...
@@ -235,7 +235,7 @@ public getKeys(id?: Identity) {
if
(
!
(
sshauthzservice
.
logout
===
null
))
{
if
(
!
(
sshauthzservice
.
logout
===
null
))
{
window
.
open
(
sshauthzservice
.
logout
);
window
.
open
(
sshauthzservice
.
logout
);
}
}
let
path
=
local
Storage
.
getItem
(
'
path
'
);
let
path
=
session
Storage
.
getItem
(
'
path
'
);
console
.
log
(
'
I should have a keycert now
'
);
console
.
log
(
'
I should have a keycert now
'
);
this
.
updateAgentContents
();
this
.
updateAgentContents
();
console
.
log
(
'
requested agent contens update
'
);
console
.
log
(
'
requested agent contens update
'
);
...
@@ -311,10 +311,10 @@ public getKeys(id?: Identity) {
...
@@ -311,10 +311,10 @@ public getKeys(id?: Identity) {
let
redirect_uri
=
window
.
location
.
origin
+
this
.
locationStrategy
.
getBaseHref
()
+
"
sshauthz_callback
"
;
let
redirect_uri
=
window
.
location
.
origin
+
this
.
locationStrategy
.
getBaseHref
()
+
"
sshauthz_callback
"
;
let
nonce
=
Math
.
random
().
toString
(
36
).
substring
(
2
,
15
)
let
nonce
=
Math
.
random
().
toString
(
36
).
substring
(
2
,
15
)
local
Storage
.
setItem
(
'
authservice
'
,
JSON
.
stringify
([
authservice
,
nonce
]));
session
Storage
.
setItem
(
'
authservice
'
,
JSON
.
stringify
([
authservice
,
nonce
]));
console
.
log
(
'
stored the authservice in
local
Storage
'
);
console
.
log
(
'
stored the authservice in
session
Storage
'
);
console
.
log
(
local
Storage
.
getItem
(
'
authservice
'
));
console
.
log
(
session
Storage
.
getItem
(
'
authservice
'
));
local
Storage
.
setItem
(
'
path
'
,
this
.
location
.
path
());
session
Storage
.
setItem
(
'
path
'
,
this
.
location
.
path
());
if
(
authservice
.
scope
==
null
)
{
if
(
authservice
.
scope
==
null
)
{
window
.
location
.
assign
(
authservice
.
authorise
+
"
?response_type=token&redirect_uri=
"
+
redirect_uri
+
"
&state=
"
+
nonce
+
"
&client_id=
"
+
authservice
.
client_id
);
window
.
location
.
assign
(
authservice
.
authorise
+
"
?response_type=token&redirect_uri=
"
+
redirect_uri
+
"
&state=
"
+
nonce
+
"
&client_id=
"
+
authservice
.
client_id
);
}
else
{
}
else
{
...
...
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