# |
Feb 12th 2020, 13:51 |
damiano |
@ndm but...for cookie the post data must have "remember_me" field otherwise it will not create the cookie |
# |
Feb 12th 2020, 13:50 |
damiano |
i must add cookie authenticator AFTER for authenticator |
# |
Feb 12th 2020, 13:50 |
damiano |
@ndm ok so the order matter when we add authenticators to the service |
# |
Feb 12th 2020, 13:48 |
ndm |
Most likely not, `beforeFind` is triggered when the query is being executed. You could make it configurable via options that you evaluate in your `beforeFind` handler, or maybe apply it in an overwritten `Table::find()`. |
# |
Feb 12th 2020, 13:45 |
k4t |
when I define some "default" values for query in BeforeFind is it possible to overwrite them somehow during building query in e.g. controller? |
# |
Feb 12th 2020, 13:44 |
challgren |
@dereuromark what you think about adding docblocks to foc/bootstrap-ui? |
# |
Feb 12th 2020, 13:35 |
ndm |
If required it's also possible to trigger that process manually via the authentication component. |
# |
Feb 12th 2020, 13:35 |
ndm |
Persisting is what happens after succesful authentication (unless the authenticator is stateless), once the request returns from the controller layer, the middleware will invoke the persisting process, where authenticators like the session and cookie authenticators will store the identity accordingly. |
# |
Feb 12th 2020, 13:29 |
damiano |
@ndn with "persisted" do you mean when i already have identified the user via Form Authenticator (for example) ? |
# |
Feb 12th 2020, 13:28 |
ndm |
@damiano The cookie is being created automatically when the identity is being persisted |
# |
Feb 12th 2020, 13:14 |
pieceof |
CAKEPHP (cake2) |
# |
Feb 12th 2020, 13:08 |
challgren |
Not sure I dont directly use the new authentication plugins |
# |
Feb 12th 2020, 13:08 |
damiano |
right? |
# |
Feb 12th 2020, 13:08 |
damiano |
already created |
# |
Feb 12th 2020, 13:08 |
damiano |
@challgren i am trying...thanks, however the cookie authentication supposes that there is a cookie names CookieAuth right? |
# |
Feb 12th 2020, 12:55 |
challgren |
Not sure |
# |
Feb 12th 2020, 12:54 |
damiano |
wrong? |
# |
Feb 12th 2020, 12:53 |
damiano |
@challgren i am dealing with cookies because i want to create the remember_me authetication...i have followed the doc, but i miss a part, is the AuthCookie created automatically? it seems not, i first should create the cookie and then cake will "just update" it... |
# |
Feb 12th 2020, 12:52 |
damiano |
it works so,....ok....but maybe am i just lucky? :) |
# |
Feb 12th 2020, 12:52 |
damiano |
and now it works, without returning anything |
# |
Feb 12th 2020, 12:52 |
damiano |
@challgren i do not know if it is a problem or not...but i tried $this->response->withCookie(new Cookie(......); |
# |
Feb 12th 2020, 12:49 |
challgren |
Did you try $this->response = $this->response->withCookie() |
# |
Feb 12th 2020, 12:45 |
damiano |
at the end of the action |
# |
Feb 12th 2020, 12:45 |
damiano |
@ishan hmm wait i do not see the view if i do return $response |
# |
Feb 12th 2020, 12:44 |
damiano |
@ishan i try |
# |
Feb 12th 2020, 12:38 |
damiano |
guys, do i have to return the response to perfectly create a cookie? |
# |
Feb 12th 2020, 11:54 |
md.islam11 |
its not working . |
# |
Feb 12th 2020, 11:53 |
md.islam11 |
in my request post , I am doing above key-value map. |
# |
Feb 12th 2020, 11:53 |
md.islam11 |
request_items[0][docs][0][file_name] |
# |
Feb 12th 2020, 11:53 |
md.islam11 |
How to write key-value map |
# |
Feb 12th 2020, 11:52 |
md.islam11 |
How to achieve that? |
# |
Feb 12th 2020, 11:52 |
md.islam11 |
request - > has Many requestItems requestItems -> has Many Docs |
# |
Feb 12th 2020, 11:26 |
admad |
@dereuromark hmm, guess bit needs to be looked into further i guess |
# |
Feb 12th 2020, 11:21 |
lilhermit |
Also how to i create migration using type `uuid` creates var_char, using binary doesn't auto-create id |
# |
Feb 12th 2020, 11:18 |
dereuromark |
thats why i am confused |
# |
Feb 12th 2020, 11:18 |
dereuromark |
I am using latest master.. |
# |
Feb 12th 2020, 11:17 |
admad |
Nice work getting your sandbox updated. |
# |
Feb 12th 2020, 11:16 |
admad |
@dereuromark https://github.com/cakephp/cakephp/pull/14241 Don't be a n00b :) |
# |
Feb 12th 2020, 11:15 |
lilhermit |
Hi I notice CakePHP (4) has a BinaryUuidType how do I tell Cakephp the id field (which is binary(16)) is of type BinaryUuid? |
# |
Feb 12th 2020, 11:05 |
damiano |
i do not see the cookie in debugkit |
# |
Feb 12th 2020, 11:05 |
damiano |
$expiry = new Time('+ 1 year'); $this->response->withCookie(new Cookie( 'CookieAuth', ['test@test.com', '$2y$10$7MozJQ1bJ7l65YNq/MfffffVkZVCONNxN9.I/yMc1hKGiYE1/B8GnS'], $expiry )); |