use of fi.otavanopisto.muikku.session.AccessToken in project muikku by otavanopisto.
the class GoogleCalendarClient method getAccessTokenCredential.
@SuppressWarnings("unused")
private GoogleCredential getAccessTokenCredential() {
AccessToken googleAccessToken = sessionController.getOAuthAccessToken("google");
if (googleAccessToken != null) {
Details details = new Details();
details.setClientId("-");
details.setClientSecret("-");
GoogleClientSecrets secrets = new GoogleClientSecrets();
secrets.setWeb(details);
return new GoogleCredential.Builder().setClientSecrets(secrets).setTransport(TRANSPORT).setJsonFactory(JSON_FACTORY).build().setAccessToken(googleAccessToken.getToken());
}
return null;
}
Aggregations