Post Page Advertisement [Top]





The general format for a password is:
{id}encodedPassword
Such that id is an identifier used to look up which PasswordEncoder should be used and encodedPassword is the original encoded password for the selected PasswordEncoder. The id must be at the beginning of the password, start with { and end with }. If the id cannot be found, the id will be null. For example, the following might be a list of passwords encoded using different id. All of the original passwords are "password".

そのIDはPasswordEncoderを探し識別子です。必ずタイプしてください。

encodePasswordは選択されたPasswordEncoderによって
エンコードされたパスワードです。

IDは「 { 」で始まり、「 } 」で終わります。
またパスワードの一番最初に配置する必要があります。

もしIDが発見つからない場合はIDはnullになります。

他のIDを使用して、encodeされたパスワードのリストを下の例に書き留めておいた。

サンプルコード全て元のパスワードは「password」です。


暗号化のサンプルコードが必要な人は、リンクを参照してください。


総合するとスプリングセキュリティのバージョン5以降では、

passwordの前に識別子情報を書き込む必要があります。


除いた場合


There is no PasswordEncoder mapped for the id"null"


エラーが出ます。


暗号化を使用しないなら

<security:authentication-manager>
    <security:authentication-provider>
        <security:user-service>
            <security:user name="user" password="{noop}password" authorities="ROLE_USER"/>
        </security:user-service>
    </security:authentication-provider>
</security:authentication-manager>

このようにパスワードの前、{noop}をタイプしてください。エラーは消えます。

댓글 없음:

댓글 쓰기

Bottom Ad [Post Page]

| Designed by Colorlib