NUBIC/aker — pull request #25 by yipdw (2012-12-03 21:07:36+00:00)
Title: Extend the static authority's #valid_credentials! to set more user attributes

`Aker::Authorities::Static#valid_credentials!` is the supported way of adding users to a static authority. We should be able to set additional user attributes with it, such as group memberships.

(Maybe it'd make sense to rename #valid_credentials! and add an alias with a deprecation warning, too.)

Something like this:

```ruby
auth.valid_credentials!(:user, "foo", "bar") do |u|
u.in_group!(:NOTIS, "Manager", :affiliate_ids => [20, 30]
u.first_name = "Foo"
end
```

Machine account handling in https://github.com/NUBIC/ncs_staff_portal is motivating this feature. This could also simplify `Aker::Authorities::Static#load!`.