Skip to content

Commit 2609d15

Browse files
author
Anders Breid
authored
Implement token auth (#140)
* No implementation done, but added information about how to use tokens when authenticating.
1 parent 3b3158c commit 2609d15

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

src/main/resources/templates/subscription.html

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,17 @@ <h3 class="modal-title text-center" id="formHeader">Subscription Form</h3>
133133
</label>
134134
</div>
135135
</div>
136-
<!-- Form post emailSubject field -->
136+
<!-- Form post emailSubject field -->
137137
<div class="form-group" data-bind="visible: !$root.restPost()">
138138
<label class="h5 control-label font-weight-bold">Subject</label>
139139
<img class="cursor-pointer popup-large" id="restPostMediaTypeInfo" alt="RestPostMediaType Info" src="assets/images/information.png" data-toggle="tooltip" data-placement="top"
140140
title=
141141
"This will be the subject of the email,<br>
142142
which will be sent as a subscription notification. <br>
143-
Default value is set by admin in property file" />
143+
Default value is set by admin in property file" />
144144
<div>
145145
<input id="emailSubjectID" data-bind="textInput:$data.emailSubject, onChange"
146-
name="emailSubject" placeholder="emailSubject" class="form-control" type="text"/>
146+
name="emailSubject" placeholder="emailSubject" class="form-control" type="text"/>
147147
</div>
148148
</div>
149149

@@ -165,7 +165,7 @@ <h3 class="modal-title text-center" id="formHeader">Subscription Form</h3>
165165
<span data-bind="text: label"></span>
166166
</label>
167167
</div>
168-
168+
169169
</div>
170170

171171
<div class="form-group">
@@ -232,7 +232,9 @@ <h3 class="modal-title text-center" id="formHeader">Subscription Form</h3>
232232
<div class="form-group">
233233
<label class="h5 pl-1 control-label font-weight-bold">NotificationMeta</label>
234234
<img class="cursor-pointer" id="notificationMetaInfo" alt="NotificationMeta Info" src="assets/images/information.png" data-toggle="tooltip" data-placement="top"
235-
title="The specific point to notify. Example: my@mail.com or host.com/endpoint"/>
235+
title=
236+
"The specific point to notify. Example: my@mail.com or host.com/endpoint<br>
237+
Jenkins: As a jenkins user this is where you may set a job-token. Not to be mistaken for the API token that is used as a password for authentication against the entire jenkins instance." />
236238
<div>
237239
<span class="text-danger font-small" id="invalidNotificationMeta"></span>
238240
<textarea id="notificationMeta" data-bind="textInput:$data.notificationMeta, onChange"
@@ -259,16 +261,21 @@ <h3 class="modal-title text-center" id="formHeader">Subscription Form</h3>
259261
<span class="help-block"></span>
260262
</div>
261263

262-
<label data-bind="visible: $root.showPassword()" class="pl-1 control-label font-weight-bold">Password*</label>
263-
264+
<label data-bind="visible: $root.showPassword()" class="pl-1 control-label font-weight-bold">Password/Token*</label>
265+
<img class="cursor-pointer popup-large" id="restPostMediaTypeInfo" alt="RestPostMediaType Info" src="assets/images/information.png" data-toggle="tooltip" data-placement="top"
266+
title=
267+
"This is the password that will be used for authentication against a rest service. <br>
268+
Jenkins: As a jenkins user it is recommended that you set this as an API token and not user password. Not to be mistaken for the job token that is set for a single job." />
264269
<div>
265-
<input id="passwordInput" title="Enter password" data-bind="visible: $root.showPassword() && ($root.mode() == 'edit' || $root.mode() == 'add'),textInput:$data.password" name="password" placeholder="password"
266-
class="form-control" type="password" />
270+
<input id="passwordInput" title="Enter password" data-bind="visible: $root.showPassword() && ($root.mode() == 'edit' || $root.mode() == 'add'),textInput:$data.password"
271+
name="password" placeholder="password" class="form-control" type="password" />
272+
</div>
267273

274+
<div>
268275
<div data-bind="visible: !$root.showPassword() && $root.mode() == 'edit'" class="showPasswordButton" >
269276
<button data-bind="click: function(){$root.showPassword(true);}" class="btn btn-warning">
270277
<i class="glyphicon glyphicon-trash"></i>
271-
Change password
278+
Change password/token
272279
</button>
273280
</div>
274281
<span class="help-block"></span>

0 commit comments

Comments
 (0)