-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from SW13-Monstera/dev
Release
- Loading branch information
Showing
15 changed files
with
281 additions
and
125 deletions.
There are no files selected for viewing
Submodule backend-config
updated
from 9ced1f to 9b8d69
40 changes: 40 additions & 0 deletions
40
src/main/kotlin/io/csbroker/apiserver/common/config/AwsClientConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package io.csbroker.apiserver.common.config | ||
|
||
import aws.sdk.kotlin.runtime.auth.credentials.StaticCredentialsProvider | ||
import aws.sdk.kotlin.services.s3.S3Client | ||
import aws.sdk.kotlin.services.ses.SesClient | ||
import org.springframework.beans.factory.annotation.Value | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
class AwsClientConfig( | ||
@Value("\${aws.mail-url}") | ||
private val url: String, | ||
@Value("\${aws.access-key}") | ||
private val accessKey: String, | ||
@Value("\${aws.secret-key}") | ||
private val secretKey: String, | ||
) { | ||
@Bean | ||
fun sesClient(): SesClient { | ||
return SesClient { | ||
region = url | ||
credentialsProvider = StaticCredentialsProvider { | ||
accessKeyId = accessKey | ||
secretAccessKey = secretKey | ||
} | ||
} | ||
} | ||
|
||
@Bean | ||
fun s3Client(): S3Client { | ||
return S3Client { | ||
region = url | ||
credentialsProvider = StaticCredentialsProvider { | ||
accessKeyId = accessKey | ||
secretAccessKey = secretKey | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/io/csbroker/apiserver/service/common/MailService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package io.csbroker.apiserver.service.common | ||
|
||
interface MailService { | ||
suspend fun sendPasswordChangeMail(to: String) | ||
suspend fun sendPasswordChangeMail(email: String) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.