1
- <?php include (__DIR__ . '/resources/templates/header.php ' ); ?>
2
- <?php include (__DIR__ . '/resources/controllers/session.php ' ); ?>
3
- <br>
4
- <main role="main" class="container">
5
- <div class="jumbotron">
6
- <img class="sticky" src="<?php echo $ img ; ?> " alt="Logo" style="height: 60px; width: 60px; margin-bottom: 20px;">
7
- <h1 style="display: inline;"><?php echo $ title ; ?> </h1>
8
- <p style="margin-bottom: 0px;"><strong>Client ID: </strong> <?php echo $ clientId ; ?> </p>
9
- <?php if (!empty ($ clientSecret )) {
10
- echo "<p><b>Client Secret: </b> $ clientSecret</p> " ;
11
- }
12
- ?>
13
- <br>
1
+ <?php include (__DIR__ . '/resources/templates/header.php ' ); ?>
2
+ <?php include (__DIR__ . '/resources/controllers/session.php ' ); ?>
3
+ <br>
4
+ <main role="main" class="container">
5
+ <div class="jumbotron">
6
+ <img class="sticky" src="<?php echo $ img ; ?> " alt="Logo"
7
+ style="height: 60px; width: 60px; margin-bottom: 20px;">
8
+ <h1 style="display: inline;">
9
+ <?php echo $ title ; ?>
10
+ </h1>
11
+ <p style="margin-bottom: 0px;"><strong>Client ID: </strong>
12
+ <?php echo $ clientId ; ?>
13
+ </p>
14
+ <?php if (!empty ($ clientSecret )) {
15
+ echo "<p><b>Client Secret: </b> $ clientSecret</p> " ;
16
+ }
17
+ ?>
18
+ <br>
14
19
15
- <?php if ($ enableActiveTokensTable ) : ?>
20
+ <?php if ($ enableActiveTokensTable ): ?>
16
21
<ul class="nav nav-pills">
17
- <li class="nav-item"><a class="nav-link active" data-toggle="tab" href="#accessTokenMenu">My Access Token</a></li>
18
- <li class="nav-item"><a class="nav-link" data-toggle="tab" href="#refreshTokenMenu">My Refresh Tokens</a></li>
22
+ <li class="nav-item"><a class="nav-link active" data-toggle="tab" href="#accessTokenMenu">My Access
23
+ Token</a></li>
24
+ <li class="nav-item"><a class="nav-link" data-toggle="tab" href="#refreshTokenMenu">My Refresh Tokens</a>
25
+ </li>
19
26
</ul>
20
- <?php endif ; ?>
27
+ <?php endif ; ?>
21
28
22
- <div class="tab-content">
23
- <div id="accessTokenMenu" class="tab-pane active">
24
- <?php if ($ showIdToken ) : ?>
29
+ <div class="tab-content">
30
+ <div id="accessTokenMenu" class="tab-pane active">
31
+ <?php if ($ showIdToken ): ?>
25
32
<div>
26
33
<p class="lead" style="margin-bottom: 0px;">ID Token: </p>
27
- <input id="idToken" size=70 type="text" readonly style="cursor: text;" value="<?php echo $ idToken ; ?> " />
28
- <button id="copy-mAccessT" style="cursor: pointer" class="btn btn-copy btn-primary"><em class="icon-file"></em> Copy</button>
34
+ <input id="idToken" size=70 type="text" readonly style="cursor: text;"
35
+ value="<?php echo $ idToken ; ?> " />
36
+ <button id="copy-mAccessT" style="cursor: pointer" class="btn btn-copy btn-primary"><em
37
+ class="icon-file"></em> Copy</button>
29
38
</div>
30
- <?php endif ; ?>
39
+ <?php endif ; ?>
40
+ <div>
41
+ <p class="lead" style="margin-bottom: 0px;">Access Token: </p>
42
+ <input id="accessToken" size=70 type="text" readonly style="cursor: text;"
43
+ value="<?php echo $ accessToken ; ?> " />
44
+ <button id="copy-mAccessT" style="cursor: pointer" class="btn btn-copy btn-primary"><em
45
+ class="icon-file"></em> Copy</button>
46
+ </div>
47
+ <div>
48
+ <p style="margin-bottom: 0px;">To get the user info use the following curl command: </p>
49
+ <input id="curlUserInfo" size=70 type="text" readonly style="cursor: text;"
50
+ value="<?php echo getCurlForEndpoint ($ accessToken , $ userInfoEndpoint ); ?> " />
51
+ <button id="copyCurlUserInfo" style="cursor: pointer" class="btn btn-copy btn-primary"><em
52
+ class="icon-file"></em> Copy</button>
53
+ </div>
54
+ <?php if (!empty ($ customAPIs )) { ?>
55
+ <?php foreach ($ customAPIs as $ API ) { ?>
56
+ <div>
57
+ <p style="margin-bottom: 0px;">
58
+ <?php echo $ API ["title " ]; ?>
59
+ </p>
60
+ <input id="curlUserInfo" size=70 type="text" readonly style="cursor: text;"
61
+ value="<?php echo getCurlForEndpoint ($ accessToken , $ API ["url " ]); ?> " />
62
+ <button id="copyCurlUserInfo" style="cursor: pointer" class="btn btn-copy btn-primary"><em
63
+ class="icon-file"></em> Copy</button>
64
+ <p>
65
+ <?php echo $ API ["note " ]; ?>
66
+ </p>
67
+ </div>
68
+ <?php } ?>
69
+ <?php } ?>
70
+ <?php if ($ allowIntrospection ): ?>
31
71
<div>
32
- <p class="lead" style="margin-bottom: 0px;">Access Token: </p>
33
- <input id="accessToken" size=70 type="text" readonly style="cursor: text;" value="<?php echo $ accessToken ; ?> " />
34
- <button id="copy-mAccessT" style="cursor: pointer" class="btn btn-copy btn-primary"><em class="icon-file"></em> Copy</button>
72
+ <p style="margin-bottom: 0px;">To introspect the token use the following curl command: </p>
73
+ <input id="curlIntrospection" size=70 type="text" readonly style="cursor: text;"
74
+ value="<?php echo getCurlIntrospect ($ accessToken , $ introspectionEndpoint , $ clientId , $ clientSecret ); ?> " />
75
+ <button id="copyCurlIntrospection" style="cursor: pointer" class="btn btn-copy btn-primary"><em
76
+ class="icon-file"></em> Copy</button>
35
77
</div>
36
- <div>
37
- <p style="margin-bottom: 0px;">To get the user info use the following curl command: </p>
38
- <input id="curlUserInfo" size=70 type="text" readonly style="cursor: text;" value="<?php echo getCurlUserInfo ($ accessToken , $ userInfoEndpoint ); ?> " />
39
- <button id="copyCurlUserInfo" style="cursor: pointer" class="btn btn-copy btn-primary"><em class="icon-file"></em> Copy</button>
78
+ <?php endif ; ?>
79
+ <p>
80
+ <?php echo $ accessTokenNote ; ?>
81
+ </p>
82
+ <?php if (!empty ($ refreshToken )) { ?>
83
+ <div id="refreshTokenBlock">
84
+ <p class="lead" style="margin-bottom: 0px;">Refresh Token: </p>
85
+ <input id="refreshToken" size=70 type="text" readonly style="cursor: text;"
86
+ value="<?php echo $ refreshToken ; ?> " />
87
+ <button id="copyRefreshToken" style="cursor: pointer" class="btn btn-copy btn-primary"><em
88
+ class="icon-file"></em> Copy</button>
89
+ <p>
90
+ <?php echo $ refreshTokenNote ; ?>
91
+ </p>
40
92
</div>
41
- <?php if ($ allowIntrospection ) : ?>
42
93
<div>
43
- <p style="margin-bottom: 0px;">To introspect the token use the following curl command: </p>
44
- <input id="curlIntrospection" size=70 type="text" readonly style="cursor: text;" value="<?php echo getCurlIntrospect ($ accessToken , $ introspectionEndpoint , $ clientId , $ clientSecret ); ?> " />
45
- <button id="copyCurlIntrospection" style="cursor: pointer" class="btn btn-copy btn-primary"><em class="icon-file"></em> Copy</button>
94
+ <p style="margin-bottom: 0px;">To generate access tokens from this refresh token use the following
95
+ curl command: </p>
96
+ <input id="curlRefresh" size=70 type="text" readonly style="cursor: text;"
97
+ value="<?php echo getCurlRefresh ($ refreshToken , $ tokenEndpoint , $ clientId , $ clientSecret , $ scopes ); ?> " />
98
+ <button id="copyCurlRefresh" style="cursor: pointer" class="btn btn-copy btn-primary"><em
99
+ class="icon-file"></em> Copy</button>
100
+ <p>
101
+ <?php echo $ accessTokenNote ; ?>
102
+ </p>
46
103
</div>
47
- <?php endif ; ?>
48
- <p><?php echo $ accessTokenNote ; ?> </p>
49
- <?php if (!empty ($ refreshToken )) { ?>
50
- <div id="refreshTokenBlock">
51
- <p class="lead" style="margin-bottom: 0px;">Refresh Token: </p>
52
- <input id="refreshToken" size=70 type="text" readonly style="cursor: text;" value="<?php echo $ refreshToken ; ?> " />
53
- <button id="copyRefreshToken" style="cursor: pointer" class="btn btn-copy btn-primary"><em class="icon-file"></em> Copy</button>
54
- <p><?php echo $ refreshTokenNote ; ?> </p>
55
- </div>
56
- <div>
57
- <p style="margin-bottom: 0px;">To generate access tokens from this refresh token use the following curl command: </p>
58
- <input id="curlRefresh" size=70 type="text" readonly style="cursor: text;" value="<?php echo getCurlRefresh ($ refreshToken , $ tokenEndpoint , $ clientId , $ clientSecret , $ scopes ); ?> " />
59
- <button id="copyCurlRefresh" style="cursor: pointer" class="btn btn-copy btn-primary"><em class="icon-file"></em> Copy</button>
60
- <p><?php echo $ accessTokenNote ; ?> </p>
61
- </div>
62
- <br>
63
- <?php } else { ?>
64
- <form id="createRefreshToken" action="refreshtoken.php" method="POST">
65
- <input type="hidden" name="action" value="create-refresh-token" />
66
- <input class="btn btn-primary" type="submit" value="Create Refresh Token" />
67
- </form>
68
- <?php } ?>
69
- <p><?php echo $ manageTokenNote ; ?> <a target="_blank" class="navbar-brand" href="<?php echo $ manageTokens ; ?> "><?php echo $ manageTokens ; ?> </a></p>
70
- </div>
71
- <?php if ($ enableActiveTokensTable ) : ?>
104
+ <br>
105
+ <?php } else { ?>
106
+ <form id="createRefreshToken" action="refreshtoken.php" method="POST">
107
+ <input type="hidden" name="action" value="create-refresh-token" />
108
+ <input class="btn btn-primary" type="submit" value="Create Refresh Token" />
109
+ </form>
110
+ <?php } ?>
111
+ <p>
112
+ <?php echo $ manageTokenNote ; ?> <a target="_blank" class="navbar-brand"
113
+ href="<?php echo $ manageTokens ; ?> ">
114
+ <?php echo $ manageTokens ; ?>
115
+ </a>
116
+ </p>
117
+ </div>
118
+ <?php if ($ enableActiveTokensTable ): ?>
72
119
<div id="refreshTokenMenu" class="tab-pane fade">
73
120
<table class="table table-striped">
74
121
<caption>Active Refresh Tokens</caption>
84
131
</tbody>
85
132
</table>
86
133
</div>
87
- <?php endif ; ?>
88
- </div>
89
-
134
+ <?php endif ; ?>
90
135
</div>
91
- </main>
92
- <?php include (__DIR__ . '/resources/templates/footer.php ' ); ?>
136
+
137
+ </div>
138
+ </main>
139
+ <?php include (__DIR__ . '/resources/templates/footer.php ' ); ?>
140
+
0 commit comments