Skip to content

Instantly share code, notes, and snippets.

View umair8k's full-sized avatar
🎯
Focusing

Mohd Umer Faisal umair8k

🎯
Focusing
  • Hyderabad
View GitHub Profile
@m-cakir
m-cakir / CustomPasswordTokenResponseClient.java
Last active April 4, 2023 02:02
Add User-Agent header on Oauth2 Client - Spring Boot
package *;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.core.convert.converter.Converter;
import org.springframework.http.HttpHeaders;
import org.springframework.http.RequestEntity;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.FormHttpMessageConverter;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.security.oauth2.client.endpoint.OAuth2AccessTokenResponseClient;
@m-cakir
m-cakir / FirebaseImageService.java
Last active May 13, 2025 08:57
Spring Boot - File Upload to Firebase (Google Cloud)
import com.google.auth.oauth2.GoogleCredentials;
import com.google.cloud.storage.Blob;
import com.google.cloud.storage.Bucket;
import com.google.firebase.FirebaseApp;
import com.google.firebase.FirebaseOptions;
import com.google.firebase.cloud.StorageClient;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.boot.context.properties.ConfigurationProperties;