@@ -9,9 +9,9 @@ An unobtrusive ruby authentication library based on ActiveRecord.
9
9
## Documentation
10
10
11
11
| Version | Documentation |
12
- | ------------ | ------------------------------------------------------------------- |
12
+ | ---------- | ----------------------------------------------------------------- |
13
13
| Unreleased | https://github.com/binarylogic/authlogic/blob/master/README.md |
14
- | 6.4.2 | https://github.com/binarylogic/authlogic/blob/v6.4.2 /README.md |
14
+ | 6.4.3 | https://github.com/binarylogic/authlogic/blob/v6.4.3 /README.md |
15
15
| 5.2.0 | https://github.com/binarylogic/authlogic/blob/v5.2.0/README.md |
16
16
| 4.5.0 | https://github.com/binarylogic/authlogic/blob/v4.5.0/README.md |
17
17
| 3.7.0 | https://github.com/binarylogic/authlogic/blob/v3.7.0/README.md |
@@ -77,14 +77,14 @@ The above handles the entire authentication process for you by:
77
77
78
78
You can also log out (i.e. ** destroying** the session):
79
79
80
- ``` ruby
80
+ ``` ruby
81
81
session.destroy
82
82
```
83
83
84
84
After a session has been created, you can persist it (i.e. ** finding** the
85
85
record) across requests. Thus keeping the user logged in:
86
86
87
- ``` ruby
87
+ ``` ruby
88
88
session = UserSession .find
89
89
```
90
90
@@ -106,15 +106,15 @@ is all you will need to do.
106
106
You may specify how passwords are cryptographically hashed (or encrypted) by
107
107
setting the Authlogic::CryptoProvider option:
108
108
109
- ``` ruby
109
+ ``` ruby
110
110
c.crypto_provider = Authlogic ::CryptoProviders ::BCrypt
111
111
```
112
112
113
113
Also, sessions are automatically maintained. You can switch this on and off with
114
114
configuration, but the following will automatically log a user in after a
115
115
successful registration:
116
116
117
- ``` ruby
117
+ ``` ruby
118
118
User .create(params[:user ])
119
119
```
120
120
@@ -152,17 +152,17 @@ code is organized.** There are 2 models, your Authlogic model and your
152
152
ActiveRecord model:
153
153
154
154
1 . ** Authlogic::Session** , your session models that
155
- extend ` Authlogic::Session::Base ` .
155
+ extend ` Authlogic::Session::Base ` .
156
156
2 . ** Authlogic::ActsAsAuthentic** , which adds in functionality to your
157
- ActiveRecord model when you call ` acts_as_authentic ` .
157
+ ActiveRecord model when you call ` acts_as_authentic ` .
158
158
159
159
### 1.c. Installation
160
160
161
161
To install Authlogic, add this to your Gemfile:
162
162
163
- ` gem 'authlogic' `
163
+ ` gem 'authlogic' `
164
164
165
- And run ` bundle install ` .
165
+ And run ` bundle install ` .
166
166
167
167
## 2. Rails
168
168
@@ -173,7 +173,7 @@ Let's walk through a typical rails setup. ([Compatibility](#90-compatibility))
173
173
If you want to enable all the features of Authlogic, a migration to create a
174
174
` User ` model might look like this:
175
175
176
- ``` ruby
176
+ ``` ruby
177
177
class CreateUser < ActiveRecord ::Migration
178
178
def change
179
179
create_table :users do |t |
344
344
> Because ActionController::API does not include ActionController::Cookies
345
345
> metal and ActionDispatch::Cookies rack module, Therefore, our controller can
346
346
> not use the cookies method.
347
+ >
347
348
> - [ #684 ] ( https://github.com/binarylogic/authlogic/pull/684 ) .
348
349
349
350
### 2.c. View
406
407
```
407
408
408
409
### 2.e. SameSite Cookie Attribute
410
+
409
411
The SameSite attribute tells browsers when and how to fire cookies in first- or third-party situations. SameSite is used by a variety of browsers to identify whether or not to allow a cookie to be accessed.
410
412
411
413
Up until recently, the standard default value when SameSite was not explicitly defined was to allow cookies in both first- and third-party contexts. However, starting with Chrome 80+, the SameSite attribute will not default to Lax behavior meaning cookies will only be permitted in first-party contexts.
@@ -420,25 +422,25 @@ See [Authlogic::TestCase](https://github.com/binarylogic/authlogic/blob/master/l
420
422
421
423
## 4. Helpful links
422
424
423
- * <b >API Reference:</b > http://www.rubydoc.info/github/binarylogic/authlogic
424
- * <b >Repository:</b > https://github.com/binarylogic/authlogic/tree/master
425
- * <b >Railscasts Screencast:</b > http://railscasts.com/episodes/160-authlogic
426
- * <b >Example repository with tutorial in README:</b > https://github.com/binarylogic/authlogic_example/tree/master
427
- * <b >Tutorial</b >: Rails Authentication with Authlogic https://www.sitepoint.com/rails-authentication-with-authlogic
428
- * <b >Issues:</b > https://github.com/binarylogic/authlogic/issues
429
- * <b >Chrome is not logging out on browser close</b > https://productforums.google.com/forum/#!topic/chrome/9l-gKYIUg50/discussion
425
+ - <b >API Reference:</b > http://www.rubydoc.info/github/binarylogic/authlogic
426
+ - <b >Repository:</b > https://github.com/binarylogic/authlogic/tree/master
427
+ - <b >Railscasts Screencast:</b > http://railscasts.com/episodes/160-authlogic
428
+ - <b >Example repository with tutorial in README:</b > https://github.com/binarylogic/authlogic_example/tree/master
429
+ - <b >Tutorial</b >: Rails Authentication with Authlogic https://www.sitepoint.com/rails-authentication-with-authlogic
430
+ - <b >Issues:</b > https://github.com/binarylogic/authlogic/issues
431
+ - <b >Chrome is not logging out on browser close</b > https://productforums.google.com/forum/#!topic/chrome/9l-gKYIUg50/discussion
430
432
431
433
## 5. Add-ons
432
434
433
- * <b >Authlogic OpenID addon:</b > https://github.com/binarylogic/authlogic_openid
434
- * <b >Authlogic LDAP addon:</b > https://github.com/binarylogic/authlogic_ldap
435
- * <b >Authlogic Facebook Connect:</b > https://github.com/kalasjocke/authlogic-facebook-connect
436
- * <b >Authlogic Facebook Connect (New JS API):</b > https://github.com/studybyte/authlogic_facebook_connect
437
- * <b >Authlogic Facebook Shim</b > https://github.com/james2m/authlogic_facebook_shim
438
- * <b >Authlogic OAuth (Twitter):</b > https://github.com/jrallison/authlogic_oauth
439
- * <b >Authlogic Oauth and OpenID:</b > https://github.com/lancejpollard/authlogic-connect
440
- * <b >Authlogic PAM:</b > https://github.com/nbudin/authlogic_pam
441
- * <b >Authlogic x509:</b > https://github.com/auth-scc/authlogic_x509
435
+ - <b >Authlogic OpenID addon:</b > https://github.com/binarylogic/authlogic_openid
436
+ - <b >Authlogic LDAP addon:</b > https://github.com/binarylogic/authlogic_ldap
437
+ - <b >Authlogic Facebook Connect:</b > https://github.com/kalasjocke/authlogic-facebook-connect
438
+ - <b >Authlogic Facebook Connect (New JS API):</b > https://github.com/studybyte/authlogic_facebook_connect
439
+ - <b >Authlogic Facebook Shim</b > https://github.com/james2m/authlogic_facebook_shim
440
+ - <b >Authlogic OAuth (Twitter):</b > https://github.com/jrallison/authlogic_oauth
441
+ - <b >Authlogic Oauth and OpenID:</b > https://github.com/lancejpollard/authlogic-connect
442
+ - <b >Authlogic PAM:</b > https://github.com/nbudin/authlogic_pam
443
+ - <b >Authlogic x509:</b > https://github.com/auth-scc/authlogic_x509
442
444
443
445
If you create one of your own, please let us know about it so we can add it to
444
446
this list. Or just fork the project, add your link, and send us a pull request.
@@ -486,16 +488,16 @@ in `authlogic/session/base.rb`.
486
488
487
489
## 90. Compatibility
488
490
489
- | Version | branch | ruby | activerecord |
490
- | ------- | ------------ | -------- | ------------- |
491
- | 6.4.2 | 6-4-stable | >= 2.4.0 | >= 5.2, < 7.1 |
492
- | 5.2 | 5-2-stable | >= 2.3.0 | >= 5.2, < 6.1 |
493
- | 4.5 | 4-5-stable | >= 2.3.0 | >= 4.2, < 5.3 |
494
- | 4.3 | 4-3-stable | >= 2.3.0 | >= 4.2, < 5.3 |
495
- | 4.2 | 4-2-stable | >= 2.2.0 | >= 4.2, < 5.3 |
496
- | 3 | 3-stable | >= 1.9.3 | >= 3.2, < 5.3 |
497
- | 2 | rails2 | >= 1.9.3 | ~ > 2.3.0 |
498
- | 1 | ? | ? | ? |
491
+ | Version | branch | ruby | activerecord |
492
+ | ------- | ---------- | -------- | ------------- |
493
+ | 6.4.3 | 6-4-stable | >= 2.4.0 | >= 5.2, < 7.2 |
494
+ | 5.2 | 5-2-stable | >= 2.3.0 | >= 5.2, < 6.1 |
495
+ | 4.5 | 4-5-stable | >= 2.3.0 | >= 4.2, < 5.3 |
496
+ | 4.3 | 4-3-stable | >= 2.3.0 | >= 4.2, < 5.3 |
497
+ | 4.2 | 4-2-stable | >= 2.2.0 | >= 4.2, < 5.3 |
498
+ | 3 | 3-stable | >= 1.9.3 | >= 3.2, < 5.3 |
499
+ | 2 | rails2 | >= 1.9.3 | ~ > 2.3.0 |
500
+ | 1 | ? | ? | ? |
499
501
500
502
Under SemVer, [ changes to dependencies] [ 10 ] do not require a major release.
501
503
0 commit comments