I am using Google App Engine (java-based) to create a signed url for my files in google cloud storage. According to google cloud description, we need to define the expiration period. For example, can I create a long-term expiration period like 50 years? Google has not been very specific about this. It has mentioned 7 days, but my signed url has been working beyond 7 days.
On example like:
URL signedURL = storage.signUrl(blobinfo, 18000, TimeUnit.DAYS);
The Signed URL limit of 7 days of expiration applies to V4 signing. As you are not specifying the signing version in your code, V2 will be used as default.
In the source code of the library in github here there's a comment stating that the V4 has a 7 day limit but it doesn't say anything about the V2. The V2 signing doesn't have any specific expiration limit, so the only limitation is the maximum value for int.
If you want to use V4 signing you have to include withV4Signature(), for example:
URL url = storage.signUrl(blobinfo, 15, TimeUnit.MINUTES, Storage.SignUrlOption.withV4Signature());
Related
I am working on an app using NativeScript and am using Microsoft OAuth2 to authenticate the user, send emails and access SharePoint with it. My problem is that the authentication token I get expires after 1 hour so the user has to login again over and over. A temporary solution I am using is refresh_token which lasts longer (I believe 14 days by default and up to 90 days) but still that is not what I would like. My ideal solution would be an option to stay signed in but it does not seem to exist at this moment.
I have read this page https://learn.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-token-session-sso and am not sure how to extend the lifetime of my token. If I can extend it at least for a year or six months, that would be great but I don't know how to do it.
My app is not registered in Azure but in apps.dev.microsoft.com and I have looked in the manifest but haven't found anything I could write to change the token type or its lifetime.
If I use native FB login on an iPhone, the returned AccessToken doesn't seem to have an expiration date, unlike the one I get using browser based (non-native) login. Is this by design? The reason I ask is that the Parse.com API requires a valid expiration date. For now, I just use today's date plus three years.
It does have that within the AccessToken class. See this example of usage in the Google login portion of the chat tutorial although it's applicable for Facebook too.
I am using Admin SDK. I am retrieving 30 users per request. I am using nextPageToken to get next 30 users. Can anyone tell me how long is the nextPageToken?
nextPageToken doesn't have validity timeout. It's just pointer to specific location in the index.
I'm regularly releasing a Google Appengine application through the command line utility appcfg.sh/appcfg.cmd. Unfortunately, the cookie that stores my password has a short expiration time; a week or less. Is it possible to extend this period?
Why not use an OAuth2 token instead of using password based authentication?
It is more convenient and can be permanently stored, no more typing passwords!
I have a small app written in Google App Engine, and I use the basic login: required in app.yaml for authentication. This gives me the Google login box, which has the "Stay signed in" option. However, even with the "Stay signed in" option I get logged out fairly quickly (within a day or two). Is there any way to extend this timeout? Is there any way around it using the users API?
Log in to your admin console, select an app, and choose 'Application Settings'. Then, change the expiration period under 'cookie expiration' - options are 1 day, 1 week, and 2 weeks.