Skip to content

Commit

Permalink
A bit of tidying after merging #106
Browse files Browse the repository at this point in the history
  • Loading branch information
pond committed Mar 28, 2024
1 parent d673acc commit 8ff9af6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ Scimitar.engine_configuration = Scimitar::EngineConfiguration.new({

When it comes to token access, Scimitar neither enforces nor presumes any kind of encoding for bearer tokens. You can use anything you like, including encoding/encrypting JWTs if you so wish - https://rubygems.org/gems/jwt may be useful. The way in which a client might integrate with your SCIM service varies by client and you will have to check documentation to see how a token gets conveyed to that client in the first place (e.g. a full OAuth flow with your application, or just a static token generated in some UI which an administrator copies and pastes into their client's SCIM configuration UI).

**Strongly recommended:** You should wrap any Scimitar configuration with `Rails.application.config.to_prepare do...` so that any changes you make to configuration during local development are reflected via auto-reload, rather than requiring a server restart.

```ruby
Rails.application.config.to_prepare do
Scimitar.engine_configuration = Scimitar::EngineConfiguration.new({
# ...
end
end
```

In general, Scimitar's own development and tests assume this approach. If you choose to put the configuration directly into an initializer file without the `to_prepare` wrapper, you will be at a _slightly_ higher risk of tripping over unrecognised Scimitar bugs; please make sure that your own application test coverage is reasonably comprehensive.

### Routes

Expand Down
3 changes: 2 additions & 1 deletion lib/scimitar/engine.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
require 'rails/engine'

module Scimitar
class Engine < Rails::Engine
class Engine < ::Rails::Engine
isolate_namespace Scimitar

config.autoload_once_paths = %W(
#{root}/app/controllers
#{root}/app/models
Expand Down

0 comments on commit 8ff9af6

Please sign in to comment.