Last active
January 1, 2020 08:23
-
-
Save YutoKashiwagi/4062ccf7260f8437287f2568b9f4a7e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
authenticate | |
平文パスワードを渡すと、ハッシュ化されたパスワードと一致するかを確かめ、偽であればfalse,真であればオブジェクトを返す | |
def authenticate(request, &login_procedure) | |
if has_basic_credentials?(request) | |
login_procedure.call(*user_name_and_password(request)) | |
end | |
end | |
create:オブジェクトの作成と保存を同時に行い、オブジェクトを返す |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment