File tree Expand file tree Collapse file tree 2 files changed +23
-9
lines changed Expand file tree Collapse file tree 2 files changed +23
-9
lines changed Original file line number Diff line number Diff line change 6
6
*/
7
7
interface {
8
8
9
- /**
10
- * Retrieve a user by unique identifier
11
- *
12
- * @id The unique identifier
13
- *
14
- * @return User that implements JWTSubject and/or IAuthUser
15
- */
16
- any function get ( required id );
9
+ /**
10
+ * Verify if the incoming username/password are valid credentials.
11
+ *
12
+ * @username The username
13
+ * @password The password
14
+ */
15
+ boolean function isValidCredentials ( required username , required password );
17
16
17
+ /**
18
+ * Retrieve a user by username
19
+ *
20
+ * @return User that implements JWTSubject and/or IAuthUser
21
+ */
22
+ function retrieveUserByUsername ( required username );
23
+
24
+ /**
25
+ * Retrieve a user by unique identifier
26
+ *
27
+ * @id The unique identifier
28
+ *
29
+ * @return User that implements JWTSubject and/or IAuthUser
30
+ */
31
+ function retrieveUserById ( required id );
18
32
}
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ component accessors="true" singleton{
143
143
*/
144
144
function authenticate (){
145
145
// Get the User it represents
146
- var oUser = getUserService ().get ( getPayload ().sub );
146
+ var oUser = getUserService ().retrieveUserById ( getPayload ().sub );
147
147
148
148
// Verify it
149
149
if ( isNull ( oUser ) || ! len ( oUser .getId () ) ){
You can’t perform that action at this time.
0 commit comments