Der Server erhält eine one-time authorization code von der mobilen App. Ich muss dies in ein Spring-Social-Access-Token konvertieren und Token aktualisieren und sie für spätere Verwendung auf der Server-DB speichern.Spring Social Google - Umwandlung eines einmaligen Autorisierungscodes in ein Zugriffstoken/Aktualisierungstoken auf dem Server
Mein aktueller Code:
String oneTimeAuthorizationCode= "xxx"; // provided by mobile client
ConnectionData cd = new ConnectionData("google", null, null, null, null, oneTimeAuthorizationCode, null, null, null);
GoogleConnectionFactory googleConnectionFactory = (GoogleConnectionFactory) connectionFactoryLocator.getConnectionFactory("google");
Connection<Google> connection = googleConnectionFactory.createConnection(cd);
// get the google API and work with it
Google google = (Google) connection.getApi();
oneTimeAuthorizationCode falsch ist, da die connection ein Zugriffstoken erwartet und nicht den Berechtigungscode Zeit. Irgendeine Idee, wie Spring-Social-google den Einmal-Code für ein Access-Token und ein Refresh-Token austauschen kann?