how to get the all the past session time between date range in wso26.0 Identity server? - wso2

I tired to get the session data from /sessions api. but it gives only active session data . I need past sessions data between the date range.

Related

Power Automate - Wait till Power BI dataset refresh completes\fails

I have created a Flow in Power automate, have used a Refresh a Power BI dataset component , there is no issue in terms of functionality as such and I am able to refresh the dataset successfully - so far so good (till the time the dataset gets refreshed successfully)
I have added a send email component post the dataset refresh, Now, the thing is the 'Refresh a dataset' component doesn't wait till the time the dataset is completely refreshed, it just triggers the refresh with an output value as Succeeded and proceed towards sending an email while the dataset refresh is still in progress
Now, when the dataset refresh fails due to some reason - the Power Automate flow has already completed and has lost the track of the refresh
How can I make it wait till the time the dataset refresh has completed successfully or has failed and then send an email accordingly?
I have tried below but the outcome is always Success
Solved: Get alert when refresh a dataset fail - Power Platform Community (microsoft.com)
The Refresh action sends an API call to the Power BI REST API. The Refresh Dataset endpoint does not respond with an outcome indication. It just responds with whether or not the refresh request was accepted.
There are two other endpoint options Get Refresh History and Get Refresh Execution Details which you would need to monitor for completion of your refresh. I'm not saying it's impossible to implement something with Power Automate to do this, but honestly, you will have a better outcome just writing it yourself.
Power BI's lack of admin and monitoring tooling is by far its biggest shortcoming--especially surrounding refresh management. The sooner you realize you will not get out of it what you want and just accept that you're going to have to roll your own, the sooner you'll get what you need.

How to validate a request body with price

According to
Calculate price on frontend insecure?
Prices should always be validated on the backend as http requests can be modified. Basically, In my marketplace, a user can buy something and in that request body, it contains what he bought, and their prices, the subtotal as well as the corresponding catalog id for that item. However, it seems everything could be manipulated. If I were to validate the subtotal by traversing through all the items in his order, they could have been modified so this isn't accurate. If I were to look up the actual prices in the catalog based on the id, these catalog ids in the request body could have also been modified, pointing to the wrong catalog item. How could I therefore validate a price based on a users request body which contains the items and their prices, the subtotal and the catalog (database) id for each item?
Also if I'm using SSL, can't I then calculate price on the front end?
The whole cart should stay on the server, the client displays the cart and asks for confirmation. Prices can also be calculated on the client, but they must be calculated again on the server later.
You should not loose tracks of the cart data (i.e. sending it to the user and waiting for it to come back) as you cannot trust it anymore, after. You must save cart/order data on the server and send the client an id of the saved cart data along with the data itself to display (prices, etc..). Then the user sends back confirmation and the id, not the whole data. With the id you recover cart/order info on the server, with prices and all, so the prices never come from the user.
Anything the user sends you can be changed by him if he is technical enough.
Use of encription does not help, encription avoids changes to data happening during the travel between the source (client) and the destination (server). It does not guarantee the client itself is trustworty or the data is right.
The forgery happens in the client, before encription takes place (a user can manipulate url data or POST data as he wishes, altering the prices, before they get encrypted).
Also, encription usually guarantees the server owner is the right one (the server has a cerrificate) to the client, it does not not guarantee the user or client software is trustworty, so users using modified browsers are totally legit and cannot in any way be distinguished.

coldfusion query in session problems

Using Coldfusion 8, Coldbox 2.6.3.
Storing query object in session. Session is set asynchronously and attempted to be read from 'instantly' in a popup window to generate excel sheet/csv. Initial error of garbage data in the generated file fixed with 'cflock' on setting/reading session code chunks(session scope). Same session var is set in multiple places to different queries. New error is that the session var is just set to the previous query it was set to and not the one it should be set to. After waiting a few seconds and doing a refresh, session var has correct query.
A Coldfusion exception is generated in CF debugging that a certain query column is not defined - the column names being hardcoded to read from the query in session - which just means that the session var has the wrong query which I confirmed to be the previous query using cfdump.
I wonder why cflock would fix the garbage data problem but not this problem.
Thanks.

Google calendar sync issue with "Remember the milk" subscribed calendar

We are using Google Calendar API v2 for syncing the Google calendar events to our desktop application. The application retrieves all calendar events and keeps it locally for future reference.
I have sync issues with my "Remember the Milk" calendar, which I subscribed to using my Google calendar.
Here is my application flow:
Initially fetch calendar list by using the following HTTP request:
https://www.google.com/calendar/feeds/default/allcalendars/full
Fetch all events from calendar with the Calendar ID obtained in the previous request: http://www.google.com/calendar/feeds/CalendarId/private/full?orderby=lastmodified&sortorder=descending&singleevents=true
Process each calendar one by one and save the calendar updated-min tag value as last calendar sync, in the next sync use this updated min value for retrieving updated events.
The documentation says it should give only updated events, but my "Remember the Milk" calendar, always gives all events as updated events (on every 20 to 30 minutes).
What am I doing wrong here?
Look at your query string. You are missing the updated-min value. The query string should read.
http://www.google.com/calendar/feeds/CalendarId/private/full?orderby=lastmodified&sortorder=descending&singleevents=true&updated-min=2005-08-09T10:57:00-

In django, are all session data deleted if a user logs out?

I need to track some information on users, but would like to retain it for a fixed time period, say a week.
If I set this value via request.sessions, and the user logs out, can I retrieve it if they log back in later? This all assumes that my sessions are normally set to expire in 30 days, if the user neVer logs out.
While thinking about the above problem, I decided to store the data in a table, but I would still like to know the answer to above for referenCe. I also decided not to use cookies due to unreliability.
It would depend on your session backend. But the default backend (backends.db) does delete the row from the sessions table when you log out.
I would recommend adding the data to a field in the user profile. Using the session will give problems even if you don't delete the data. The next time the user logs in you won't know which session id he/she used the last time and normally you only have the session id to look up. Not a user id so you can get all sessions owned by a specific user.