omniauth-rakomi 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8cccdc6ce14672e98141f7fc5bcd63ca16977b423f06b40c0799b681896b99d1
4
+ data.tar.gz: 7947cc16fece4c3d82e7869cdade4183d27a5481c8bf08c295fde1e7a997df44
5
+ SHA512:
6
+ metadata.gz: c84f6b43bc715a55b97eed430f071477c6ca90c0fd6f116e239366f9e301db06cda6ecadda5083585d68dd941b1c484199cc6c0763e8820846b05c48a2713db3
7
+ data.tar.gz: 34e81c4ed53077edb6a41cdb3dfd51f137237c38a6dbed5655aa7edc563274e13b56c0283d322d5fd74f67296c7ba63bfe3d55e910ed363966feab93371a22ec
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - OmniAuth strategy `:rakomi` on `omniauth_openid_connect`, with the Rakomi issuer and discovery as defaults.
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CRE8EVE Sp. z o.o.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # omniauth-rakomi
2
+
3
+ [OmniAuth](https://github.com/omniauth/omniauth) strategy for signing users in with
4
+ [Rakomi](https://rakomi.com). It is a thin subclass of
5
+ [`omniauth_openid_connect`](https://github.com/omniauth/omniauth_openid_connect) with Rakomi defaults:
6
+
7
+ | Option | Default |
8
+ |---|---|
9
+ | `name` | `rakomi` |
10
+ | `issuer` | `https://api.rakomi.com` |
11
+ | `discovery` | `true` (endpoints and keys come from the issuer's discovery document) |
12
+ | `response_type` | `code` |
13
+ | `pkce` | `true` |
14
+ | `scope` | `[:openid, :email, :profile]` |
15
+
16
+ Every other `omniauth_openid_connect` option works as documented there.
17
+
18
+ ## Install
19
+
20
+ ```ruby
21
+ # Gemfile
22
+ gem "omniauth-rakomi"
23
+ ```
24
+
25
+ ## Use
26
+
27
+ Create an OAuth client in the Rakomi dashboard with the redirect URI `https://<your app>/auth/rakomi/callback`.
28
+
29
+ ```ruby
30
+ # config/initializers/omniauth.rb (Rails) or your Rack builder
31
+ Rails.application.config.middleware.use OmniAuth::Builder do
32
+ provider :rakomi,
33
+ client_options: {
34
+ identifier: ENV.fetch("RAKOMI_CLIENT_ID"),
35
+ secret: ENV.fetch("RAKOMI_CLIENT_SECRET"),
36
+ redirect_uri: "https://app.example.com/auth/rakomi/callback"
37
+ }
38
+ end
39
+ ```
40
+
41
+ OmniAuth 2 starts the flow only on a POST to `/auth/rakomi`; protect that request against CSRF (in Rails, with
42
+ `omniauth-rails_csrf_protection`). After the callback, `request.env["omniauth.auth"]` holds the user, with
43
+ `uid` set to the `sub` claim.
44
+
45
+ ## License
46
+
47
+ MIT, see [LICENSE](LICENSE).
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OmniAuth
4
+ module Rakomi
5
+ VERSION = "0.1.0"
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../omniauth-rakomi"
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "omniauth_openid_connect"
4
+
5
+ module OmniAuth
6
+ module Strategies
7
+ # Signs users in with a Rakomi issuer: authorization code flow with PKCE, endpoints and keys taken from
8
+ # the issuer's OpenID Connect discovery document. Every option of omniauth_openid_connect still applies.
9
+ class Rakomi < OmniAuth::Strategies::OpenIDConnect
10
+ DEFAULT_ISSUER = "https://api.rakomi.com"
11
+
12
+ option :name, "rakomi"
13
+ option :issuer, DEFAULT_ISSUER
14
+ option :discovery, true
15
+ option :response_type, "code"
16
+ option :pkce, true
17
+ option :scope, %i[openid email profile]
18
+ option :client_options, {
19
+ identifier: nil,
20
+ secret: nil,
21
+ redirect_uri: nil,
22
+ scheme: "https",
23
+ host: URI(DEFAULT_ISSUER).host,
24
+ port: 443,
25
+ authorization_endpoint: nil,
26
+ token_endpoint: nil,
27
+ userinfo_endpoint: nil,
28
+ jwks_uri: nil,
29
+ end_session_endpoint: nil
30
+ }
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "omniauth/rakomi/version"
4
+ require_relative "omniauth/strategies/rakomi"
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-rakomi
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - CRE8EVE Sp. z o.o.
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: omniauth_openid_connect
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '0.8'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '0.8'
26
+ description: An OmniAuth strategy named :rakomi, built on omniauth_openid_connect,
27
+ that signs users in with a Rakomi issuer using the authorization code flow, PKCE
28
+ and OpenID Connect discovery.
29
+ email:
30
+ - security@rakomi.com
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - CHANGELOG.md
36
+ - LICENSE
37
+ - README.md
38
+ - lib/omniauth-rakomi.rb
39
+ - lib/omniauth/rakomi.rb
40
+ - lib/omniauth/rakomi/version.rb
41
+ - lib/omniauth/strategies/rakomi.rb
42
+ homepage: https://rakomi.com
43
+ licenses:
44
+ - MIT
45
+ metadata:
46
+ homepage_uri: https://rakomi.com
47
+ source_code_uri: https://github.com/rakomidev/rakomi-ruby/tree/main/omniauth-rakomi
48
+ bug_tracker_uri: https://github.com/rakomidev/rakomi-ruby/issues
49
+ changelog_uri: https://github.com/rakomidev/rakomi-ruby/blob/main/omniauth-rakomi/CHANGELOG.md
50
+ rubygems_mfa_required: 'true'
51
+ rdoc_options: []
52
+ require_paths:
53
+ - lib
54
+ required_ruby_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '3.1'
59
+ required_rubygems_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ requirements: []
65
+ rubygems_version: 3.6.9
66
+ specification_version: 4
67
+ summary: OmniAuth strategy for signing in with Rakomi over OpenID Connect.
68
+ test_files: []