Merge pull request 'feat: support ha partial config' (#96) from dev into master
Reviewed-on: #96
This commit is contained in:
commit
ec48f73d9f
@ -25,6 +25,10 @@ public class HelloAssoTokenService {
|
|||||||
|
|
||||||
// Récupère un token valide (en le rafraîchissant si nécessaire)
|
// Récupère un token valide (en le rafraîchissant si nécessaire)
|
||||||
public Uni<String> getValidAccessToken() {
|
public Uni<String> getValidAccessToken() {
|
||||||
|
if (clientId == null || clientSecret == null || clientId.isEmpty() || clientSecret.isEmpty()) {
|
||||||
|
LOG.error("Client ID ou Client Secret non configuré pour HelloAsso");
|
||||||
|
return Uni.createFrom().failure(new IllegalStateException("HelloAsso client credentials not configured"));
|
||||||
|
}
|
||||||
if (currentToken == null || currentToken.isExpired()) {
|
if (currentToken == null || currentToken.isExpired()) {
|
||||||
return fetchNewToken(clientId, clientSecret);
|
return fetchNewToken(clientId, clientSecret);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user