feat: mirror platform credentials securely
parent
5de5b5d5c6
commit
f017a153a3
@ -0,0 +1,9 @@
|
||||
package com.yau.digitalrmb.platformintegration.application;
|
||||
|
||||
import com.yau.digitalrmb.platformintegration.domain.PlatformCredential;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public interface PlatformCredentialRepository {
|
||||
Optional<PlatformCredential> findCredential(long platformUserId);
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package com.yau.digitalrmb.platformintegration.domain;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public record PlatformCredential(PlatformActor actor, String rawPassword) {
|
||||
public PlatformCredential {
|
||||
Objects.requireNonNull(actor, "actor must not be null");
|
||||
if (rawPassword == null || rawPassword.isBlank()) {
|
||||
throw new IllegalArgumentException("rawPassword must not be blank");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue