From the course: Writing Secure Code for Android by Infosec
Unlock this course with a free trial
Join today to access over 25,400 courses taught by industry experts.
Session management, part 2
From the course: Writing Secure Code for Android by Infosec
Session management, part 2
- Session management part two. Let's take a look at a client server session. We know that your client app will get a token from the server. That token information can be stored in shared preferences. When the user connects to some website, they'll put in their credentials, the server will authenticate it, and it'll give you back a response, which includes an access token, a refresh token, and the time when the token will expire, usually in seconds. To maintain the session, you're going to want to store the token in shared preferences. In this way, your app can go and ask for a refresh. We keep track of the actual expiration time, so when we get the token and we get the expiration time, we're going to calculate the user login time plus the expiration time. This is when, or the token expiration time, this is when the user has got to refresh. When the user comes back to the application, you'll check, has the token expired or not? Compare the return time to the expiration time. If the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Authentication, part 111m 34s
-
(Locked)
Authentication, part 211m 3s
-
(Locked)
Activity: Implementing a password checker, part 114m 53s
-
(Locked)
Activity: Implementing a password checker, part 215m 3s
-
(Locked)
Google sign-in5m 50s
-
(Locked)
Activity: Signing in with Google and Facebook7m 48s
-
(Locked)
Keys, tokens, and secrets6m 55s
-
(Locked)
Biometrics9m 30s
-
(Locked)
Activity: Implementing biometrics12m 13s
-
(Locked)
Two-factor authentication12m 5s
-
(Locked)
Authorization, part 111m 48s
-
(Locked)
Authorization, part 25m 40s
-
(Locked)
Authorization, part 35m 40s
-
(Locked)
Activity: Implementing runtime permissions6m 35s
-
(Locked)
Activity: Role-based access control14m 39s
-
(Locked)
OAuth8m 52s
-
(Locked)
Insecure direct object reference5m 37s
-
(Locked)
Session management, part 111m 41s
-
(Locked)
Session management, part 24m 10s
-
(Locked)
Activity: Implementing session management11m 21s
-
(Locked)
-
-