This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See also: * https://github.com/rbCAS/CASinoCore/issues/18
- Loading branch information
Showing
127 changed files
with
4,689 additions
and
79 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Upgrade CASinoCore | ||
|
||
Here is a list of backward-incompatible changes that were introduced. | ||
|
||
## 1.4.0 | ||
|
||
This release changed some database structure. Be sure to advise users to migrate the database using `bundle exec rake casino_core:db:migrate`. | ||
|
||
API changes: | ||
|
||
* `LoginCredentialAcceptor`: `user_logged_in` may receive a third argument (`Time`, optional, default = `nil`) which represents the expiry date of the cookie. If it is `nil`, the cookie should be a session cookie. | ||
* `Logout`: `user_logged_out` may receive a second argument (`boolean`, optional, default = `false`). When it is `true`, the user should be redirected immediately. | ||
|
||
## 1.3.0 | ||
|
||
This release adds support for two-factor authentication using a [TOTP](http://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm) (time-based one-time password) which can be generated with applications like [Google Authenticator](http://support.google.com/a/bin/answer.py?hl=en&answer=1037451) (iPhone, Android, BlackBerry) or gadgets such as the [YubiKey](http://www.yubico.com/products/yubikey-hardware/yubikey/). | ||
|
||
If you would like to support two-factor authentication in your web application, please have a look at the corresponding processors: `SecondFactorAuthenticationAcceptor`, `TwoFactorAuthenticatorActivator`, `TwoFactorAuthenticatorDestroyer`, `TwoFactorAuthenticatorOverview`, `TwoFactorAuthenticatorRegistrator` | ||
|
||
New callbacks: | ||
|
||
* `LoginCredentialAcceptor`: calls `#two_factor_authentication_pending` on the listener, when two-factor authentication is enabled for this user. | ||
|
||
If you don't want to support two-factor authentication, nothing has to be changed. | ||
|
||
## 1.2.0 | ||
|
||
API changes: | ||
|
||
* We extracted user data into an entity. Because of this, attributes such as `username` are no longer accessible directly on a `ticket_granting_ticket`. Use `ticket_granting_ticket.user.username` instead. | ||
|
||
## 1.1.0 | ||
|
||
API changes: | ||
|
||
* `LoginCredentialAcceptor`: The parameters of `#process` changed from `params, cookies, user_agent` to just `params, user_agent` | ||
|
||
New callbacks: | ||
|
||
* `LoginCredentialRequestor` and `LoginCredentialAcceptor` call `#service_not_allowed` on the listener, when a service is not in the service whitelist. | ||
* `API::ServiceTicketProvider` calls `#service_not_allowed_via_api` on the listener, when a service is not in the service whitelist. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
defaults: &defaults | ||
service_ticket: | ||
lifetime_unconsumed: 299 | ||
authenticators: | ||
static_1: | ||
class: "CASinoCore::Authenticator::Static" | ||
options: | ||
users: | ||
testuser: | ||
password: "foobar123" | ||
name: "Test User" | ||
static_2: | ||
class: "CASinoCore::Authenticator::Static" | ||
options: | ||
users: | ||
example: | ||
password: "dito123" | ||
name: "Test User" | ||
|
||
development: | ||
<<: *defaults | ||
|
||
test: | ||
<<: *defaults |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# this configuration is only needed to setup the database for the tests | ||
|
||
# SQLite version 3.x | ||
# gem install sqlite3 | ||
# | ||
# Ensure the SQLite 3 gem is defined in your Gemfile | ||
# gem 'sqlite3' | ||
development: | ||
adapter: sqlite3 | ||
database: db/development.sqlite3 | ||
pool: 5 | ||
timeout: 5000 | ||
|
||
test: | ||
adapter: sqlite3 | ||
database: ':memory:' | ||
pool: 5 | ||
timeout: 5000 | ||
verbosity: quiet |
11 changes: 11 additions & 0 deletions
11
db/migrate/20121112154930_create_ticket_granting_tickets.rb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class CreateTicketGrantingTickets < ActiveRecord::Migration | ||
def change | ||
create_table :ticket_granting_tickets do |t| | ||
t.string :ticket, null: false, unique: true | ||
t.string :username, null: false | ||
t.text :extra_attributes | ||
|
||
t.timestamps | ||
end | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class CreateLoginTickets < ActiveRecord::Migration | ||
def change | ||
create_table :login_tickets do |t| | ||
t.string :ticket | ||
|
||
t.timestamps | ||
end | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class TicketShouldNotBeNull < ActiveRecord::Migration | ||
def change | ||
change_column :login_tickets, :ticket, :string, null: false, unique: true | ||
end | ||
end |
5 changes: 5 additions & 0 deletions
5
db/migrate/20121122180310_add_user_agent_to_ticket_granting_tickets.rb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddUserAgentToTicketGrantingTickets < ActiveRecord::Migration | ||
def change | ||
add_column :ticket_granting_tickets, :user_agent, :string | ||
end | ||
end |
5 changes: 5 additions & 0 deletions
5
db/migrate/20121124170004_add_index_for_username_to_ticket_granting_tickets.rb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddIndexForUsernameToTicketGrantingTickets < ActiveRecord::Migration | ||
def change | ||
add_index :ticket_granting_tickets, :username | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class CreateServiceTickets < ActiveRecord::Migration | ||
def change | ||
create_table :service_tickets do |t| | ||
t.string :ticket, null: false, unique: true | ||
t.string :service, null: false | ||
t.integer :ticket_granting_ticket_id, null: false | ||
|
||
t.timestamps | ||
end | ||
add_index :service_tickets, :ticket | ||
add_index :service_tickets, :ticket_granting_ticket_id | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class AddTicketIndexes < ActiveRecord::Migration | ||
def change | ||
add_index :ticket_granting_tickets, :ticket | ||
add_index :login_tickets, :ticket | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddConsumedToServiceTickets < ActiveRecord::Migration | ||
def change | ||
add_column :service_tickets, :consumed, :boolean, null: false, default: false | ||
end | ||
end |
5 changes: 5 additions & 0 deletions
5
db/migrate/20121125091934_add_issued_from_credentials_to_service_tickets.rb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddIssuedFromCredentialsToServiceTickets < ActiveRecord::Migration | ||
def change | ||
add_column :service_tickets, :issued_from_credentials, :boolean, null: false, default: false | ||
end | ||
end |
Oops, something went wrong.