package org.ntlab.acanthus_client.resources.accounts;

import org.ntlab.acanthus_client.entities.LoginResponseJson;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.PUT;
import retrofit2.http.Query;

public interface LoginRest {
    //-----------------------------------------------------------------
    //-----------------------------------------------------------------
    // トークン認証
    @GET("accounts/login")
    Call<Boolean> hasLoginToken(
            @Query("uid") String uidStr,
            @Query("token") String token
    );

    //-----------------------------------------------------------------
    // トークンの発行
    @FormUrlEncoded
    @PUT("accounts/login")
    Call<LoginResponseJson> issueLoginToken(
            @Field("email")String email,
            @Field("password")String password
    );
    //-----------------------------------------------------------------
}
