diff --git a/app/src/main/java/org/ntlab/acanthus_client/resources/accounts/AccountsRest.java b/app/src/main/java/org/ntlab/acanthus_client/resources/accounts/AccountsRest.java index eb5af07..e8a3e82 100644 --- a/app/src/main/java/org/ntlab/acanthus_client/resources/accounts/AccountsRest.java +++ b/app/src/main/java/org/ntlab/acanthus_client/resources/accounts/AccountsRest.java @@ -2,6 +2,7 @@ import org.ntlab.acanthus_client.entities.Account; import org.ntlab.acanthus_client.entities.AccountJson; +import org.ntlab.acanthus_client.entities.AccountTokenJson; import org.ntlab.acanthus_client.entities.AccountUidJson; import java.util.Collection; @@ -11,6 +12,7 @@ import retrofit2.http.FormUrlEncoded; import retrofit2.http.GET; import retrofit2.http.POST; +import retrofit2.http.PUT; import retrofit2.http.Path; import retrofit2.http.Query; @@ -40,5 +42,21 @@ @Query("token")String token ); //----------------------------------------------------------------- + //----------------------------------------------------------------- + // トークン認証 + @GET("accounts/login") + Call hasLoginToken( + @Query("uid") String uidStr, + @Query("token") String token + ); + //----------------------------------------------------------------- + // トークンの発行 + @FormUrlEncoded + @PUT("accounts/login") + Call issueLoginToken( + @Field("email")String email, + @Field("password")String password + ); + //----------------------------------------------------------------- }