File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
----
9
9
10
+ ## [ 2.8.0] =>
11
+
12
+ ### Added
13
+
14
+ * Added storage of the authenticated user into the ` prc ` scope when using ` attempt() ` to be consistent with API calls
15
+
16
+ ----
17
+
10
18
## [ 2.7.0] => 2020-SEP-14
11
19
12
20
### Added
Original file line number Diff line number Diff line change @@ -136,11 +136,18 @@ component accessors="true" singleton {
136
136
required password ,
137
137
struct customClaims = {}
138
138
){
139
+ // Authenticate via the auth service wired up
140
+ // If it fails an exception is thrown
139
141
var oUser = cbSecurity
140
142
.getAuthService ()
141
143
.authenticate ( arguments .username , arguments .password );
142
144
143
- // Create it
145
+ // Store User in ColdBox data bus
146
+ variables .requestService
147
+ .getContext ()
148
+ .setPrivateValue ( variables .settings .prcUserVariable , oUser );
149
+
150
+ // Create the token and return it
144
151
return fromUser ( oUser , arguments .customClaims );
145
152
}
146
153
You can’t perform that action at this time.
0 commit comments