code0-identities 0.0.3 → 0.0.4
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 +4 -4
- data/LICENSE +9 -0
- data/lib/code0/identities/identity_provider.rb +4 -0
- data/lib/code0/identities/provider/base_oauth.rb +4 -0
- data/lib/code0/identities/provider/discord.rb +7 -0
- data/lib/code0/identities/provider/github.rb +7 -0
- data/lib/code0/identities/provider/gitlab.rb +7 -0
- data/lib/code0/identities/provider/google.rb +7 -0
- data/lib/code0/identities/provider/microsoft.rb +7 -0
- data/lib/code0/identities/provider/oidc.rb +7 -0
- data/lib/code0/identities/provider/saml.rb +7 -0
- data/lib/code0/identities/version.rb +1 -1
- data/sig/code0/identities/identity_provider.rbs +2 -0
- data/sig/code0/identities/provider/base_oauth.rbs +2 -0
- data/sig/code0/identities/provider/saml.rbs +2 -0
- metadata +2 -2
- data/LICENSE.txt +0 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 20ecab70d2db2123f9c85738ae2897a9426eda9b4c13c4a9f455ddbf1b9dc423
|
|
4
|
+
data.tar.gz: 39c36eb33cf35810cf34a359c9ff1356afadfc1bb649bf597795d9aa5861fefc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d0b802ab7def3ecc76192bd7c9207c4d2030a0a01cfa47410b1fe4d69ba4847dd4f9fcd5ed17c135cc1737e9efd758d8dc6298640f3363af7db88449c0d8ee7d
|
|
7
|
+
data.tar.gz: 546c6dc2d4b88510c3cfb4c2367395a11a1a2a11d76e013b95634ca892a092e2ee5b59421ff641a57a42bcfda586ab9a657c5f4f821703bb247b3edb84eadb5c
|
data/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Copyright 2023-2026 Code0 UG (haftungsbeschränkt)
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
AI Usage Restriction: Notwithstanding the permissions granted above, this Software and its source code may not be used, in whole or in part, for the purpose of training, fine-tuning, or developing artificial intelligence (AI) models or machine learning algorithms without prior written consent from the Copyright Holder.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -4,6 +4,13 @@ module Code0
|
|
|
4
4
|
module Identities
|
|
5
5
|
module Provider
|
|
6
6
|
class Discord < BaseOauth
|
|
7
|
+
def config_attributes
|
|
8
|
+
{
|
|
9
|
+
required: %i[client_id client_secret redirect_uri],
|
|
10
|
+
optional: %i[provider_name]
|
|
11
|
+
}
|
|
12
|
+
end
|
|
13
|
+
|
|
7
14
|
def token_url
|
|
8
15
|
"https://discord.com/api/oauth2/token"
|
|
9
16
|
end
|
|
@@ -4,6 +4,13 @@ module Code0
|
|
|
4
4
|
module Identities
|
|
5
5
|
module Provider
|
|
6
6
|
class Github < BaseOauth
|
|
7
|
+
def config_attributes
|
|
8
|
+
{
|
|
9
|
+
required: %i[client_id client_secret redirect_uri],
|
|
10
|
+
optional: %i[provider_name]
|
|
11
|
+
}
|
|
12
|
+
end
|
|
13
|
+
|
|
7
14
|
def token_url
|
|
8
15
|
"https://github.com/login/oauth/access_token"
|
|
9
16
|
end
|
|
@@ -4,6 +4,13 @@ module Code0
|
|
|
4
4
|
module Identities
|
|
5
5
|
module Provider
|
|
6
6
|
class Gitlab < BaseOauth
|
|
7
|
+
def config_attributes
|
|
8
|
+
{
|
|
9
|
+
required: %i[base_url client_id client_secret redirect_uri],
|
|
10
|
+
optional: %i[provider_name]
|
|
11
|
+
}
|
|
12
|
+
end
|
|
13
|
+
|
|
7
14
|
def base_url
|
|
8
15
|
config[:base_url]
|
|
9
16
|
end
|
|
@@ -4,6 +4,13 @@ module Code0
|
|
|
4
4
|
module Identities
|
|
5
5
|
module Provider
|
|
6
6
|
class Google < BaseOauth
|
|
7
|
+
def config_attributes
|
|
8
|
+
{
|
|
9
|
+
required: %i[client_id client_secret redirect_uri],
|
|
10
|
+
optional: %i[provider_name]
|
|
11
|
+
}
|
|
12
|
+
end
|
|
13
|
+
|
|
7
14
|
def base_url
|
|
8
15
|
"https://accounts.google.com"
|
|
9
16
|
end
|
|
@@ -4,6 +4,13 @@ module Code0
|
|
|
4
4
|
module Identities
|
|
5
5
|
module Provider
|
|
6
6
|
class Microsoft < BaseOauth
|
|
7
|
+
def config_attributes
|
|
8
|
+
{
|
|
9
|
+
required: %i[client_id client_secret redirect_uri],
|
|
10
|
+
optional: %i[provider_name]
|
|
11
|
+
}
|
|
12
|
+
end
|
|
13
|
+
|
|
7
14
|
def base_url
|
|
8
15
|
"https://graph.microsoft.com/"
|
|
9
16
|
end
|
|
@@ -4,6 +4,13 @@ module Code0
|
|
|
4
4
|
module Identities
|
|
5
5
|
module Provider
|
|
6
6
|
class Oidc < BaseOauth
|
|
7
|
+
def config_attributes
|
|
8
|
+
{
|
|
9
|
+
required: %i[client_id client_secret redirect_uri token_url user_details_url authorization_url],
|
|
10
|
+
optional: %i[provider_name]
|
|
11
|
+
}
|
|
12
|
+
end
|
|
13
|
+
|
|
7
14
|
def token_url
|
|
8
15
|
config[:token_url]
|
|
9
16
|
end
|
|
@@ -10,6 +10,13 @@ module Code0
|
|
|
10
10
|
@config_loader = config_loader
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
def config_attributes
|
|
14
|
+
{
|
|
15
|
+
required: %i[],
|
|
16
|
+
optional: %i[provider_name metadata_url settings response_settings attribute_statements]
|
|
17
|
+
}
|
|
18
|
+
end
|
|
19
|
+
|
|
13
20
|
def authorization_url
|
|
14
21
|
request = OneLogin::RubySaml::Authrequest.new
|
|
15
22
|
request.create(create_settings)
|
|
@@ -7,6 +7,8 @@ module Code0
|
|
|
7
7
|
|
|
8
8
|
def initialize: () -> void
|
|
9
9
|
|
|
10
|
+
def []: (Symbol) -> Provider::BaseOauth
|
|
11
|
+
|
|
10
12
|
def add_provider: (provider_type: Symbol, config: Proc | Hash[Symbol, any]) -> void
|
|
11
13
|
|
|
12
14
|
def add_named_provider: (provider_id: Symbol, provider_type: Symbol, config: Proc | Hash[Symbol, any]) -> void
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: code0-identities
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dario Pranjic
|
|
@@ -144,7 +144,7 @@ files:
|
|
|
144
144
|
- ".rspec"
|
|
145
145
|
- ".rubocop.yml"
|
|
146
146
|
- ".tool-versions"
|
|
147
|
-
- LICENSE
|
|
147
|
+
- LICENSE
|
|
148
148
|
- README.md
|
|
149
149
|
- Rakefile
|
|
150
150
|
- lib/code0/identities.rb
|
data/LICENSE.txt
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 TODO: Write your name
|
|
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.
|