Skip to content
Snippets Groups Projects

Draft: feat: Add Drupal OAuth2 support into new efservices module

Files
14
/*********************************************************************
* Copyright (c) 2023 Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* Author: Zachary Sabourin <zachary.sabourin@eclipse-foundation.org>
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
package org.eclipsefoundation.efservices.api;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import org.eclipsefoundation.efservices.models.DrupalOAuthData;
/**
* Drupal OAuth2 token validation API binding
*/
@Path("oauth2/tokens")
@Produces(MediaType.APPLICATION_JSON)
@RegisterRestClient(configKey = "accounts-api")
public interface DrupalOAuthAPI {
@GET
@Path("{token}")
DrupalOAuthData getTokenInfo(@PathParam("token") String token);
}
Loading