This is a simple Spring Boot application that demonstrates how to retrieve a token from a remote service using RESTful APIs
The application includes a GetTokenApplication class that defines a REST endpoint /login for authenticating to a remote service and retrieving a token. It uses a RemoteServiceClient to communicate with the remote service.
- Java JDK 8 or higher
- Maven
- Clone the repository:
git clone https://github.com/abhishekshah2905/spring-boot-get-token.git
- Navigate to the project directory:
cd spring-boot-get-token
- Build the project:
mvn clean install
- Run the application:
mvn spring-boot:run
- Access the application at http://localhost:8080
- The application includes a RemoteServiceClient that communicates with the remote service to retrieve a token.
- It defines a GET endpoint /login that expects a JSON request body containing the SAML response. It then uses this response to authenticate and retrieve the token from the remote service.