LoginSignup
1
1

More than 5 years have passed since last update.

[備忘録]symfony2の認証処理で標準と違うユーザー名パスワードのタグ名を使用した時の設定

Posted at
<div ng-controller="LoginController as Login">
<form action="/login" id="loginForm" name="loginForm" method="post" novalidate>

  <input type="text" id="loginId" name="form[loginId]" placeholder="Login ID"
    required="true" ng-model="Login.loginId" value="" autofocus/>

  <input type="password" id="loginPwd" name="form[loginPwd]"
    placeholder="password" required="true" ng-model="Login.loginPwd" value=""/>

  <button type="button"ng-click="Login.doLogin()">Sign in</button>

</form>
</div>

の場合、こう書く。

secrity.yml
        secured_area:
            form_login:
                # ログイン画面URL
                login_path: /login
                # ログイン実行URL
                check_path: /login_check
                # ユーザ名とパスワードのタグ名
                username_parameter:             form[loginId]
                password_parameter:             form[loginPwd]

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1