package io.delphiplatform.api.v2.view;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.validation.Valid;

import io.delphiplatform.api.v2.model.AuthTokenRequestBody;
import io.delphiplatform.api.v2.model.AuthTokenResponseBody;

public interface OAuthApi {

    @RequestMapping(value = "/oauth/token",
        produces = {"application/json"},
        consumes = {"application/json"},
        method = RequestMethod.POST)
    ResponseEntity<AuthTokenResponseBody> authPost(@Valid @RequestBody AuthTokenRequestBody body);

}
