2 changed files with 66 additions and 57 deletions
@ -0,0 +1,6 @@ |
|||||
|
extends main |
||||
|
block dtp-navbar |
||||
|
block focused-content |
||||
|
|
||||
|
h1 FOCUS |
||||
|
block content |
@ -1,62 +1,65 @@ |
|||||
extends ../layouts/main |
extends ../layouts/focused |
||||
block dtp-navbar |
|
||||
block content |
block content |
||||
|
|
||||
section.uk-section.uk-section-default |
section.uk-section.uk-section-default |
||||
.uk-container |
.uk-container |
||||
|
|
||||
.uk-card.uk-card-default |
form(method="POST", action="/oauth2/authorize/decision").uk-form |
||||
.uk-card-header |
|
||||
h1.uk-card-title DTP Connect |
input(name="transaction_id", type="hidden", value= oauth2.transactionID) |
||||
|
|
||||
.uk-card-body |
.uk-card.uk-card-default |
||||
.uk-margin |
.uk-card-header |
||||
div #{oauth2.client.site.name} is requesting access to your #{oauth2.user.username_lc}@#{site.domainKey} community account. If you authorize this access, you will be able to use #{oauth2.client.site.name} as #{oauth2.user.username_lc}@#{oauth2.client.site.domainKey}. |
h1.uk-card-title DTP Connect |
||||
|
|
||||
.uk-margin |
.uk-card-body |
||||
div(uk-grid).uk-flex-middle.uk-grid-divider.uk-grid-match |
.uk-margin |
||||
div(class="uk-width-1-1 uk-width-auto@m") |
div #{oauth2.client.site.name} is requesting access to your #{oauth2.user.username_lc}@#{site.domainKey} community account. If you authorize this access, you will be able to use #{oauth2.client.site.name} as #{oauth2.user.username_lc}@#{oauth2.client.site.domainKey}. |
||||
div(uk-grid).uk-grid-small.uk-flex-middle |
|
||||
.uk-width-auto |
.uk-margin |
||||
img(src=`http://${oauth2.client.site.domain}/img/icon/${oauth2.client.site.domainKey}/icon-48x48.png`) |
div(uk-grid).uk-flex-middle.uk-grid-divider.uk-grid-match |
||||
.uk-width-expand |
div(class="uk-width-1-1 uk-width-auto@m") |
||||
h4.uk-margin-remove= oauth2.client.site.name |
div(uk-grid).uk-grid-small.uk-flex-middle |
||||
.uk-text-small.uk-text-muted= oauth2.client.site.domainKey |
.uk-width-auto |
||||
|
img(src=`http://${oauth2.client.site.domain}/img/icon/${oauth2.client.site.domainKey}/icon-48x48.png`) |
||||
div(class="uk-width-1-1 uk-width-auto@m").uk-text-center |
.uk-width-expand |
||||
span |
h4.uk-margin-remove= oauth2.client.site.name |
||||
i.fas.fa-link |
.uk-text-small.uk-text-muted= oauth2.client.site.domainKey |
||||
|
|
||||
div(class="uk-width-1-1 uk-width-auto@m") |
div(class="uk-width-1-1 uk-width-auto@m").uk-text-center |
||||
div(uk-grid).uk-grid-small |
span |
||||
.uk-width-auto |
i.fas.fa-link |
||||
img(src=`/image/${oauth2.user.picture.small._id}`, style="width: 48px; height: auto;") |
|
||||
div(class="uk-width-auto") |
div(class="uk-width-1-1 uk-width-auto@m") |
||||
h4.uk-margin-remove= oauth2.user.displayName |
div(uk-grid).uk-grid-small |
||||
.uk-text-small.uk-text-muted @#{oauth2.user.username} |
.uk-width-auto |
||||
|
img(src=`/image/${oauth2.user.picture.small._id}`, style="width: 48px; height: auto;") |
||||
.uk-margin |
div(class="uk-width-auto") |
||||
- |
h4.uk-margin-remove= oauth2.user.displayName |
||||
var scopeMap = { |
.uk-text-small.uk-text-muted @#{oauth2.user.username} |
||||
'account-read': 'Read account information (not email)', |
|
||||
'event-write': 'Write events to your timelines', |
.uk-margin |
||||
}; |
- |
||||
var scopes = oauth2.client.scopes.map((scope) => { |
var scopeMap = { |
||||
return scopeMap[scope] || scope; |
'account-read': 'Read account information (not email)', |
||||
}); |
'event-write': 'Write events to your timelines', |
||||
|
}; |
||||
.uk-text-bold Permissions requested: |
var scopes = oauth2.client.scopes.map((scope) => { |
||||
ul.uk-list.uk-list-square |
return scopeMap[scope] || scope; |
||||
each scope in scopes |
}); |
||||
li= scope |
|
||||
|
.uk-text-bold Permissions requested: |
||||
.uk-card-footer |
ul.uk-list.uk-list-square |
||||
div(uk-grid) |
each scope in scopes |
||||
.uk-width-expand |
li= scope |
||||
+renderBackButton() |
|
||||
.uk-width-auto |
.uk-card-footer |
||||
button(id="deny", type="submit", value="Deny").uk-button.uk-button-default Deny |
div(uk-grid) |
||||
.uk-width-auto |
.uk-width-expand |
||||
button(id="allow", type="submit", value="Allow").uk-button.uk-button-primary Allow |
+renderBackButton() |
||||
|
.uk-width-auto |
||||
//- pre= JSON.stringify(oauth2, null, 2) |
button(id="deny", type="submit", value="Deny").uk-button.uk-button-default Deny |
||||
|
.uk-width-auto |
||||
|
button(id="allow", type="submit", value="Allow").uk-button.uk-button-primary Allow |
||||
|
|
||||
|
pre= JSON.stringify(oauth2, null, 2) |
Loading…
Reference in new issue