started on gmail controller
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,6 +6,7 @@ target/
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
*/.DS_Store
|
*/.DS_Store
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
|
credentials.json
|
||||||
|
|
||||||
### STS ###
|
### STS ###
|
||||||
.apt_generated
|
.apt_generated
|
||||||
|
|||||||
12
pom.xml
12
pom.xml
@@ -68,6 +68,18 @@
|
|||||||
<artifactId>hypersistence-utils-hibernate-63</artifactId>
|
<artifactId>hypersistence-utils-hibernate-63</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.google.api-client/google-api-client -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.api-client</groupId>
|
||||||
|
<artifactId>google-api-client</artifactId>
|
||||||
|
<version>2.6.0</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/com.google.oauth-client/google-oauth-client-jetty -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.oauth-client</groupId>
|
||||||
|
<artifactId>google-oauth-client-jetty</artifactId>
|
||||||
|
<version>1.36.0</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.apis</groupId>
|
<groupId>com.google.apis</groupId>
|
||||||
<artifactId>google-api-services-gmail</artifactId>
|
<artifactId>google-api-services-gmail</artifactId>
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.safeqr.app.gmail.controller;
|
||||||
|
|
||||||
|
import com.safeqr.app.gmail.service.GmailService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static com.safeqr.app.constants.APIConstants.API_VERSION;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(API_VERSION)
|
||||||
|
public class GmailController {
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(GmailController.class);
|
||||||
|
GmailService gmailService;
|
||||||
|
@Autowired
|
||||||
|
public GmailController(GmailService gmailService) {
|
||||||
|
this.gmailService = gmailService;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/gmail/authenticate", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
|
public ResponseEntity<?> authenticate() {
|
||||||
|
logger.info("Health Check");
|
||||||
|
return ResponseEntity.ok(Map.of("version", "SafeQR v1.0.2"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
11
src/main/java/com/safeqr/app/gmail/service/GmailService.java
Normal file
11
src/main/java/com/safeqr/app/gmail/service/GmailService.java
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
package com.safeqr.app.gmail.service;
|
||||||
|
|
||||||
|
import com.safeqr.app.qrcode.service.EmailVerificationService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class GmailService {
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(GmailService.class);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user