Movable Type 6から提供されるData APIの使い方を紹介します。 本エントリーではJavaScript SDK APIのauthenticate()を使った認証について解説します。 1.基本 authenticate()はユーザー認証を行うためのAPIです。 authenticate()を使ってログインするための簡単なサンプルを紹介します。 <script> // API生成コード等は省略 $('#login').click(function(){ api.authenticate({ username: $('#user').val(), password: $('#pass').val(), remember: true }, function(response) { if (response.error) { // Handle error } $('#result'
![Movable Type Data APIの使い方:authenticate()](https://cdn-ak-scissors.b.st-hatena.com/image/square/bdf8222865facafab9ba38a15d49290456d0f66a/height=288;version=1;width=512/https%3A%2F%2Fwww.koikikukan.com%2Fimages%2F2013%2F07%2F20130711_movabletype_13.png)