hokui/hokui.net — pull request #17 by iTakeshi (2014-08-10 03:50:19+00:00)
Title: Update session processing

### 1. GET /api/session 削除

### 2. POST /api/session にuserを含む
sending
```json
{
"email": "guest@ec.hokudai.ac.jp",
"password": "guest"
}
```
returns
```json
{
"logged_in": true,
"token": "c70feb5d492c77a6daaaac034c56254f7528f14f9fe89fab1d3582df69182fcf",
"user": {
"id": 2,
"email": "guest@ec.hokudai.ac.jp",
"full_name": "guest guest",
"handle_name": "guest",
"birthday": "1990-01-01",
"email_mobile": "guest@example.com",
"admin": false,
"graduation_year_id": 1,
"errors": {}
}
}
```

### 3. logoutは常に200を返す
with valid token
```json
{
"logged_out": true
}
```
withOUT valid token
```json
{
"logged_out": false
}
```

### 4. `rake db:dev`で非adminユーザー生成
email: guest@ec.hokudai.ac.jp
password: guest