File tree Expand file tree Collapse file tree 2 files changed +5
-19
lines changed Expand file tree Collapse file tree 2 files changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,6 @@ let router = express.Router({
12
12
mergeParams : true
13
13
} ) ;
14
14
15
- /**
16
- * OAuth Authorization Code flow initialisation
17
- *
18
- * /api/oidc
19
- */
20
15
router
21
16
. route ( '/' )
22
17
. options ( ( req , res ) => {
25
20
. all ( jwtdecode ( ) )
26
21
27
22
/**
28
- * GET /api/users
23
+ * GET /api/oidc
29
24
*
30
- * Retrieve all users
25
+ * OAuth Authorization Code flow initialisation
31
26
*/
32
27
. get ( jwtdecode ( ) , async ( req , res ) => {
33
28
console . log ( 'oidc: init flow' ) ;
@@ -41,11 +36,6 @@ router
41
36
} ) ;
42
37
43
38
44
- /**
45
- * Oauth Authorization Code flow callback
46
- *
47
- * /api/oidc/callback
48
- */
49
39
router
50
40
. route ( '/callback' )
51
41
. options ( ( req , res ) => {
54
44
. all ( jwtdecode ( ) )
55
45
56
46
/**
57
- * GET /users/123 or /users/me
47
+ * GET /api/oidc/callback
58
48
*
59
- * Retrieve a specific user
49
+ * Oauth Authorization Code flow callback
60
50
*/
61
51
. get ( jwtdecode ( ) , async ( req , res ) => {
62
52
console . log ( 'oidc: callback' ) ;
70
60
} ) ;
71
61
72
62
/**
73
- * Executed discovery and returns the configured `openid-client` client
63
+ * Executes discovery and returns the configured `openid-client` client
74
64
*
75
65
* @param {Setting } row
76
66
* */
Original file line number Diff line number Diff line change @@ -60,22 +60,18 @@ module.exports = Mn.View.extend({
60
60
expiry = v [ 1 ] ;
61
61
}
62
62
if ( name === 'npm_oidc_error' ) {
63
- console . log ( ' ERROR 000 > ' , value ) ;
64
63
error = decodeURIComponent ( value ) ;
65
64
}
66
65
}
67
66
68
- console . log ( 'login.js event > render' , expiry , token ) ;
69
67
// register a newly acquired jwt token following successful oidc authentication
70
68
if ( token && expiry && ( new Date ( Date . parse ( decodeURIComponent ( expiry ) ) ) ) > new Date ( ) ) {
71
- console . log ( 'login.js event > render >>>' ) ;
72
69
Tokens . addToken ( token ) ;
73
70
document . location . replace ( '/' ) ;
74
71
}
75
72
76
73
// show error message following a failed oidc authentication
77
74
if ( error ) {
78
- console . log ( ' ERROR > ' , error ) ;
79
75
this . ui . oidcError . html ( error ) ;
80
76
}
81
77
You can’t perform that action at this time.
0 commit comments