feat: HelloAsso payment

This commit is contained in:
2025-08-14 22:45:03 +02:00
parent 0a56f8c180
commit 15f65b1014
28 changed files with 1003 additions and 31 deletions

View File

@@ -0,0 +1,32 @@
package fr.titionfire.ffsaf.rest.client;
import fr.titionfire.ffsaf.rest.client.dto.TokenResponse;
import io.smallrye.mutiny.Uni;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
@Path("/")
@RegisterRestClient(configKey = "helloasso-auth")
public interface HelloAssoAuthClient {
@POST
@Path("/token")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.APPLICATION_JSON)
Uni<TokenResponse> getToken(
@FormParam("grant_type") String grantType,
@FormParam("client_id") String clientId,
@FormParam("client_secret") String clientSecret
);
@POST
@Path("/token")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.APPLICATION_JSON)
Uni<TokenResponse> refreshToken(
@FormParam("grant_type") String grantType,
@FormParam("client_id") String clientId,
@FormParam("refresh_token") String refreshToken
);
}