private OAuthHmacCredential new10aCredential ( String userId ) { ClientParametersAuthentication clientAuthentication = ( ClientParametersAuthentication ) getClientAuthentication ( ) ; OAuthHmacCredential . Builder builder = new OAuthHmacCredential . Builder ( getMethod ( ) , clientAuthentication . getClientId ( ) , clientAuthentication . getClientSecret ( ) ) . setTransport ( getTransport ( ) ) . setJsonFactory ( getJsonFactory ( ) ) . setTokenServerEncodedUrl ( getTokenServerEncodedUrl ( ) ) . setClientAuthentication ( getClientAuthentication ( ) ) . setRequestInitializer ( getRequestInitializer ( ) ) . setClock ( getClock ( ) ) ; if ( getCredentialStore ( ) != null ) { builder . addRefreshListener ( new CredentialStoreRefreshListener ( userId , getCredentialStore ( ) ) ) ; } builder . getRefreshListeners ( ) . addAll ( getRefreshListeners ( ) ) ; return builder . build ( ) ; }
Returns a new OAuth 1 . 0a credential instance based on the given user ID .