Changed AuthManager::CreateAccessToken and AuthManager::ParseAccessToken

With this API we can handle expiration checks inside of AuthManager

BUG=25768507

Change-Id: I2fa5d428be6f0772d8b2656eb2bee71824f0d308
Reviewed-on: https://weave-review.googlesource.com/2030
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
diff --git a/src/privet/security_delegate.h b/src/privet/security_delegate.h
index d8090bd..fdf9a84 100644
--- a/src/privet/security_delegate.h
+++ b/src/privet/security_delegate.h
@@ -22,11 +22,13 @@
   virtual ~SecurityDelegate() {}
 
   // Creates access token for the given scope, user id and |time|.
-  virtual std::string CreateAccessToken(const UserInfo& user_info) = 0;
+  virtual std::string CreateAccessToken(const UserInfo& user_info,
+                                        base::TimeDelta ttl) const = 0;
 
-  // Validates |token| and returns scope and user id parsed from that.
-  virtual UserInfo ParseAccessToken(const std::string& token,
-                                    base::Time* time) const = 0;
+  // Validates |token| and returns scope, user id parsed from that.
+  virtual bool ParseAccessToken(const std::string& token,
+                                UserInfo* user_info,
+                                ErrorPtr* error) const = 0;
 
   // Returns list of pairing methods by device.
   virtual std::set<PairingType> GetPairingTypes() const = 0;