microsoft_kiota_authentication_oauth 0.8.0 → 0.18.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f62df65c21976f6c761f82bcec62fe603d36a139c19db481c7e23b1c90d47524
4
- data.tar.gz: d6525e628ef7a822cceefd9b83c0dc66d7830a3245f9226a0fa53fa924337b8e
3
+ metadata.gz: 82ed630929535ee9d3706aae735558670c1b4d021c2af0effa3491950463565e
4
+ data.tar.gz: 15585325c7c5e147d46b0983560e8be79bbf5aef076c5b82c6dd23b958c84600
5
5
  SHA512:
6
- metadata.gz: f68aca9abc1f4b337b16f2171a238c896e29187c779b3cdb7598150de55e988fdaa47fc56756d0574664355c3a68686b9ce1f3d3ac48ffc2fb22ce5d653f64e4
7
- data.tar.gz: 7c38d9c15ad533372599c2fe8a77b056451ec869c5b9ffbca7bd8743d118f469b4f8ed328bdc51f3174026b844160fc0f0fe954d1ecf5645adb363ab665ea186
6
+ metadata.gz: 55e80e5c595826808ed5c61e03a8cc46444a543a964fb59dce834f3bc252f2f1865af955dd797fc9135eed9b4beeacec6c25d23942b502292ac922d6398cee21
7
+ data.tar.gz: 68d000b833158b6c3237a12a42eca6270196182a3a9ffcdcf525e99f0a99b47b106aa7abd0513f00d5361be7afc5b6b2e572826ae1236429b03ecfa39ee81e75
data/Gemfile CHANGED
@@ -2,5 +2,6 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- # Specify your gem's dependencies in microsoft_kiota_authentication.gemspec
5
+ gem 'microsoft_kiota_abstractions', path: '../../abstractions'
6
+
6
7
  gemspec
data/Rakefile CHANGED
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
-
4
3
  require 'bundler/gem_tasks'
5
4
  require 'rspec/core/rake_task'
6
5
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'oauth2'
4
- require_relative './oauth_context'
4
+ require_relative 'oauth_context'
5
5
 
6
6
  module MicrosoftKiotaAuthenticationOAuth
7
7
  # Token request context class for the authorization code grant type.
@@ -11,10 +11,10 @@ module MicrosoftKiotaAuthenticationOAuth
11
11
  attr_writer :scopes
12
12
 
13
13
  # This is the initializer for AuthorizationCodeContext, the token request context when
14
- # using the authorization code grant flow.
14
+ # using the authorization code grant flow.
15
15
  # :params
16
- # tenant_id: a string containing the tenant id
17
- # client_id: a string containing the client id
16
+ # tenant_id: a string containing the tenant id
17
+ # client_id: a string containing the client id
18
18
  # client_secret: a string containing the client secret
19
19
  # redirect_uri: a string containing redirect_uri
20
20
  # auth_code: a string containting the auth code; default is nil, can be updated post-initialization
@@ -49,11 +49,11 @@ module MicrosoftKiotaAuthenticationOAuth
49
49
  # default is empty hash
50
50
  def generate_authorize_url(scopes, additional_params = {})
51
51
  @additional_params = additional_params
52
-
53
- self.initialize_scopes(scopes)
54
- self.initialize_oauth_provider
55
52
 
56
- parameters = { scope: @scopes, redirect_uri: @redirect_uri, access_type: 'offline', prompt: 'consent'}
53
+ initialize_scopes(scopes)
54
+ initialize_oauth_provider
55
+
56
+ parameters = { scope: @scopes, redirect_uri: @redirect_uri, access_type: 'offline', prompt: 'consent' }
57
57
  parameters = parameters.merge(additional_params)
58
58
  @oauth_provider.auth_code.authorize_url(parameters)
59
59
  end
@@ -71,10 +71,10 @@ module MicrosoftKiotaAuthenticationOAuth
71
71
 
72
72
  def initialize_scopes(scopes)
73
73
  scope_str = ''
74
- scopes.each { |scope| scope_str += scope + ' '}
74
+ scopes.each { |scope| scope_str += "#{scope} " }
75
75
  raise StandardError, 'scopes cannot be empty/nil.' if scope_str.empty?
76
-
77
- scope_str = 'offline_access ' + scope_str
76
+
77
+ scope_str = "offline_access #{scope_str}"
78
78
 
79
79
  @scopes = scope_str
80
80
  end
@@ -1,19 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'oauth2'
4
- require_relative './oauth_context'
4
+ require_relative 'oauth_context'
5
5
 
6
6
  module MicrosoftKiotaAuthenticationOAuth
7
7
  # Token request context class for the client credential grant type.
8
8
  class ClientCredentialContext < MicrosoftKiotaAuthenticationOAuth::OAuthContext
9
9
  attr_reader :grant_type, :additional_params, :tenant_id, :client_id, :client_secret, :oauth_provider
10
- attr_writer :scopes
10
+ attr_writer :scopes
11
11
 
12
12
  # This is the initializer for ClientCredentialContext, the token request context when
13
- # using the client credential grant flow.
13
+ # using the client credential grant flow.
14
14
  # :params
15
- # tenant_id: a string containing the tenant id
16
- # client_id: a string containing the client id
15
+ # tenant_id: a string containing the tenant id
16
+ # client_id: a string containing the client id
17
17
  # client_secret: a string containing the client secret
18
18
  # additional_params: hash of symbols to string values, ie { response_mode: 'fragment', prompt: 'login' }
19
19
  # default is empty hash
@@ -26,7 +26,6 @@ module MicrosoftKiotaAuthenticationOAuth
26
26
  @oauth_provider = nil
27
27
  @grant_type = 'client credential'
28
28
 
29
-
30
29
  if @tenant_id.nil? || @client_id.nil? || @client_secret.nil? || @tenant_id.empty? || @client_id.empty? || @client_secret.empty?
31
30
  raise StandardError, 'tenant_id, client_id and client_secret cannot be empty'
32
31
  end
@@ -38,20 +37,19 @@ module MicrosoftKiotaAuthenticationOAuth
38
37
 
39
38
  def initialize_oauth_provider
40
39
  @oauth_provider = OAuth2::Client.new(@client_id, @client_secret,
41
- site: 'https://login.microsoftonline.com',
42
- authorize_url: "/#{@tenant_id}/oauth2/v2.0/authorize",
43
- token_url: "/#{@tenant_id}/oauth2/v2.0/token")
40
+ site: 'https://login.microsoftonline.com',
41
+ authorize_url: "/#{@tenant_id}/oauth2/v2.0/authorize",
42
+ token_url: "/#{@tenant_id}/oauth2/v2.0/token")
44
43
  end
45
44
 
46
45
  # Function to initialize the scope for the client credential context object.
47
46
  # Only a single scope is supported for this flow and it's expected to be schme://service/.default
48
- def initialize_scopes(scopes = [])
47
+ def initialize_scopes(scopes = [])
49
48
  @scopes = scopes[0] unless scopes.empty?
50
49
  end
51
50
 
52
-
53
51
  private
54
-
52
+
55
53
  attr_writer :grant_type, :additional_params, :tenant_id, :client_id, :client_secret, :oauth_provider
56
54
  end
57
55
  end
@@ -1,30 +1,30 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'oauth2'
4
- require_relative './oauth_custom_flow'
4
+ require_relative 'oauth_custom_flow'
5
5
 
6
6
  module MicrosoftKiotaAuthenticationOAuth
7
- # Base class for token request contexs.
8
- class OAuthContext
9
- attr_accessor :scopes
10
- attr_reader :oauth_provider
11
- include MicrosoftKiotaAuthenticationOAuth::OAuthCustomFlow
7
+ # Base class for token request contexs.
8
+ class OAuthContext
9
+ attr_accessor :scopes
10
+ attr_reader :oauth_provider
12
11
 
13
- def get_token
14
- OAuthCustomFlow.get_token
15
- end
12
+ include MicrosoftKiotaAuthenticationOAuth::OAuthCustomFlow
16
13
 
17
- def initialize_scopes(scopes = [])
18
- @scopes = OAuthCustomFlow.get_scopes
19
- end
14
+ def get_token
15
+ OAuthCustomFlow.get_token
16
+ end
20
17
 
21
- def initialize_oauth_provider
22
- @oauth_provider = OAuthCustomFlow.get_oauth_provider
23
- end
18
+ def initialize_scopes(_scopes = [])
19
+ @scopes = OAuthCustomFlow.get_scopes
20
+ end
24
21
 
25
- private
22
+ def initialize_oauth_provider
23
+ @oauth_provider = OAuthCustomFlow.get_oauth_provider
24
+ end
26
25
 
27
- attr_writer :oauth_provider
26
+ private
28
27
 
29
- end
30
- end
28
+ attr_writer :oauth_provider
29
+ end
30
+ end
@@ -3,25 +3,25 @@
3
3
  require 'oauth2'
4
4
 
5
5
  module MicrosoftKiotaAuthenticationOAuth
6
- # Module that can be optionally implemented for supporting custom token grant flows.
7
- # To use a cutsom token grant flow, implement the functions below and
8
- # use MicrosoftKiotaAuthenticationOAuth::OAuthContext.new as your token_request_context
9
- # object for the use by the MicrosoftKiotaAuthenticationOAuth::OAuthAccessTokenProvider
10
- module OAuthCustomFlow
11
- # Function that returns an oauth client using the oauth2 gem
12
- def self.get_oauth_provider
13
- raise NotImplementedError.new
14
- end
6
+ # Module that can be optionally implemented for supporting custom token grant flows.
7
+ # To use a cutsom token grant flow, implement the functions below and
8
+ # use MicrosoftKiotaAuthenticationOAuth::OAuthContext.new as your token_request_context
9
+ # object for the use by the MicrosoftKiotaAuthenticationOAuth::OAuthAccessTokenProvider
10
+ module OAuthCustomFlow
11
+ # Function that returns an oauth client using the oauth2 gem
12
+ def self.get_oauth_provider
13
+ raise NotImplementedError
14
+ end
15
15
 
16
- # Function that returns a space seperated string of scopes, beginning with
17
- # the offline_access scope if relevant
18
- def self.get_scopes
19
- raise NotImplementedError.new
20
- end
16
+ # Function that returns a space seperated string of scopes, beginning with
17
+ # the offline_access scope if relevant
18
+ def self.get_scopes
19
+ raise NotImplementedError
20
+ end
21
21
 
22
- # Function that returns the access token
23
- def self.get_token
24
- raise NotImplementedError.new
25
- end
22
+ # Function that returns the access token
23
+ def self.get_token
24
+ raise NotImplementedError
26
25
  end
27
- end
26
+ end
27
+ end
@@ -1,72 +1,71 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'oauth2'
4
- require_relative './oauth_context'
4
+ require_relative 'oauth_context'
5
5
 
6
6
  module MicrosoftKiotaAuthenticationOAuth
7
- # Token request context class for the on behlaf of grant type.
8
- class OnBehalfOfContext < MicrosoftKiotaAuthenticationOAuth::OAuthContext
9
- attr_reader :grant_type, :additional_params, :tenant_id, :client_id, :client_secret, :oauth_provider
10
- attr_writer :scopes
7
+ # Token request context class for the on behlaf of grant type.
8
+ class OnBehalfOfContext < MicrosoftKiotaAuthenticationOAuth::OAuthContext
9
+ attr_reader :grant_type, :additional_params, :tenant_id, :client_id, :client_secret, :oauth_provider
10
+ attr_writer :scopes
11
11
 
12
- # This is the initializer for OnBehalfOfContext, the token request context when
13
- # using the client credential grant flow.
14
- # :params
15
- # tenant_id: a string containing the tenant id
16
- # client_id: a string containing the client id
17
- # client_secret: a string containing the client secret
18
- # assertion: string containing assertion (access token used in the request)
19
- # additional_params: hash of symbols to string values, ie { response_mode: 'fragment', prompt: 'login' }
20
- # default is empty hash
21
- def initialize(tenant_id, client_id, client_secret, assertion, additional_params = {})
22
- raise StandardError, 'assertion cannot be empty' if assertion.nil? || assertion.empty?
12
+ # This is the initializer for OnBehalfOfContext, the token request context when
13
+ # using the client credential grant flow.
14
+ # :params
15
+ # tenant_id: a string containing the tenant id
16
+ # client_id: a string containing the client id
17
+ # client_secret: a string containing the client secret
18
+ # assertion: string containing assertion (access token used in the request)
19
+ # additional_params: hash of symbols to string values, ie { response_mode: 'fragment', prompt: 'login' }
20
+ # default is empty hash
21
+ def initialize(tenant_id, client_id, client_secret, assertion, additional_params = {})
22
+ raise StandardError, 'assertion cannot be empty' if assertion.nil? || assertion.empty?
23
23
 
24
- @tenant_id = tenant_id
25
- @client_id = client_id
26
- @client_secret = client_secret
27
- @assertion = assertion
28
- @additional_params = additional_params
29
- @scopes = nil
30
- @oauth_provider = nil
31
- @grant_type = 'urn:ietf:params:Oauth:grant-type:jwt-bearer'
32
-
33
- if @tenant_id.nil? || @client_id.nil? || @client_secret.nil? || @client_secret.empty? || @tenant_id.empty? || @client_id.empty?
34
- raise StandardError, 'tenant_id, client_secret, and client_id cannot be empty'
35
- end
36
- end
24
+ @tenant_id = tenant_id
25
+ @client_id = client_id
26
+ @client_secret = client_secret
27
+ @assertion = assertion
28
+ @additional_params = additional_params
29
+ @scopes = nil
30
+ @oauth_provider = nil
31
+ @grant_type = 'urn:ietf:params:Oauth:grant-type:jwt-bearer'
37
32
 
38
- def get_token
39
- params = {
40
- grant_type: @grant_type,
41
- assertion: @assertion,
42
- scope: @scopes,
43
- requested_token_use: 'on_behalf_of'
44
- }
45
- @oauth_provider.on_behalf_of.get_token(params)
46
- end
33
+ if @tenant_id.nil? || @client_id.nil? || @client_secret.nil? || @client_secret.empty? || @tenant_id.empty? || @client_id.empty?
34
+ raise StandardError, 'tenant_id, client_secret, and client_id cannot be empty'
35
+ end
36
+ end
37
+
38
+ def get_token
39
+ params = {
40
+ grant_type: @grant_type,
41
+ assertion: @assertion,
42
+ scope: @scopes,
43
+ requested_token_use: 'on_behalf_of'
44
+ }
45
+ @oauth_provider.on_behalf_of.get_token(params)
46
+ end
47
47
 
48
- def initialize_oauth_provider
49
- @oauth_provider = OAuth2::Client.new(@client_id, @client_secret,
50
- site: 'https://login.microsoftonline.com',
51
- authorize_url: "/#{@tenant_id}/oauth2/v2.0/authorize",
52
- token_url: "/#{@tenant_id}/oauth2/v2.0/token")
53
- end
48
+ def initialize_oauth_provider
49
+ @oauth_provider = OAuth2::Client.new(@client_id, @client_secret,
50
+ site: 'https://login.microsoftonline.com',
51
+ authorize_url: "/#{@tenant_id}/oauth2/v2.0/authorize",
52
+ token_url: "/#{@tenant_id}/oauth2/v2.0/token")
53
+ end
54
54
 
55
- def initialize_scopes(scopes)
56
- scope_str = ''
57
- scopes.each { |scope| scope_str += scope + ' '}
58
-
59
- raise StandardError, 'scopes cannot be empty/nil.' if scope_str.empty?
60
-
61
- scope_str = 'offline_access ' + scope_str
62
-
63
- @scopes = scope_str
64
- end
55
+ def initialize_scopes(scopes)
56
+ scope_str = ''
57
+ scopes.each { |scope| scope_str += "#{scope} " }
65
58
 
66
- private
59
+ raise StandardError, 'scopes cannot be empty/nil.' if scope_str.empty?
67
60
 
68
- attr_writer :grant_type, :additional_params, :tenant_id, :client_id,
69
- :client_secret, :oauth_provider
70
-
61
+ scope_str = "offline_access #{scope_str}"
62
+
63
+ @scopes = scope_str
71
64
  end
65
+
66
+ private
67
+
68
+ attr_writer :grant_type, :additional_params, :tenant_id, :client_id,
69
+ :client_secret, :oauth_provider
70
+ end
72
71
  end
@@ -5,7 +5,7 @@ require 'oauth2'
5
5
  # Extension of Oauth2 Library to Include On Behalf Of Grant Type
6
6
  module OAuth2
7
7
  module Strategy
8
- class OnBehalfOf < Base
8
+ class OnBehalfOf < Base
9
9
  def get_token(params, response_opts = {})
10
10
  @client.get_token(params, response_opts)
11
11
  end
@@ -19,4 +19,4 @@ module OAuth2
19
19
  @on_behalf_of ||= OAuth2::Strategy::OnBehalfOf.new(self)
20
20
  end
21
21
  end
22
- end
22
+ end
@@ -16,50 +16,49 @@ module MicrosoftKiotaAuthenticationOAuth
16
16
  # :params
17
17
  # token_request_context: a instance of one of our token request context or a custom implementation
18
18
  # allowed_hosts: an array of strings, where each string is an allowed host, default is empty
19
- # scopes: an array of strings, where each string is a scope, default is empty array
19
+ # scopes: an array of strings, where each string is a scope, default is empty array
20
20
  def initialize(token_request_context, allowed_hosts = [], scopes = [])
21
21
  raise StandardError, 'Parameter token_request_context cannot be nil.' if token_request_context.nil?
22
22
 
23
23
  @token_request_context = token_request_context
24
24
 
25
25
  unless @token_request_context.is_a?(MicrosoftKiotaAuthenticationOAuth::OAuthContext)
26
- raise StandardError, 'Parameter token_request_context must be an instance of one of our grant flow context classes.'
26
+ raise StandardError,
27
+ 'Parameter token_request_context must be an instance of one of our grant flow context classes.'
27
28
  end
28
29
 
29
30
  @cached_token = nil
30
31
 
31
- @host_validator = if allowed_hosts.nil? || allowed_hosts.size.zero?
32
+ @host_validator = if allowed_hosts.nil? || allowed_hosts.empty?
32
33
  MicrosoftKiotaAbstractions::AllowedHostsValidator.new([])
33
34
  else
34
35
  MicrosoftKiotaAbstractions::AllowedHostsValidator.new(allowed_hosts)
35
36
  end
36
37
  @token_request_context.initialize_oauth_provider
37
- if scopes.nil?
38
- @scopes = []
39
- else
40
- @scopes = scopes
41
- end
38
+ @scopes = if scopes.nil?
39
+ []
40
+ else
41
+ scopes
42
+ end
42
43
  end
43
44
 
44
45
  # This function obtains the authorization token.
45
46
  # :params
46
- # uri: a string containing the uri
47
+ # uri: a string containing the uri
47
48
  # additional_params: hash of symbols to string values, ie { response_mode: 'fragment', prompt: 'login' }
48
49
  # default is empty hash
49
- def get_authorization_token(uri, additional_properties = {})
50
+ def get_authorization_token(uri, _additional_properties = {})
50
51
  nil if !uri || !@host_validator.url_host_valid?(uri)
51
52
 
52
53
  parsed_url = URI(uri)
53
54
 
54
55
  raise StandardError, 'Only https is supported' if parsed_url.scheme != 'https'
55
56
 
56
- if @scopes.empty?
57
- @scopes << "#{parsed_url.scheme}://#{parsed_url.host}/.default"
58
- end
57
+ @scopes << "#{parsed_url.scheme}://#{parsed_url.host}/.default" if @scopes.empty?
59
58
  @token_request_context.initialize_scopes(@scopes)
60
59
  Fiber.new do
61
60
  if @cached_token
62
- token = OAuth2::AccessToken.from_hash(@token_request_context.oauth_provider, @cached_token)
61
+ token = OAuth2::AccessToken.from_hash(@token_request_context.oauth_provider, @cached_token)
63
62
  token.token unless token.nil? || token.expired?
64
63
 
65
64
  if token.expired?
@@ -69,23 +68,20 @@ module MicrosoftKiotaAuthenticationOAuth
69
68
  end
70
69
  end
71
70
 
72
- token = nil
71
+ nil
73
72
  token = @token_request_context.get_token
74
73
 
75
- if !token.nil?
74
+ unless token.nil?
76
75
  @cached_token = token.to_hash
77
76
  token.token
78
- else
79
- nil
80
77
  end
81
78
  end
82
79
  end
83
80
 
84
81
  attr_reader :scopes, :host_validator
85
-
82
+
86
83
  protected
87
84
 
88
85
  attr_writer :host_validator, :token_credential, :scopes, :cached_token
89
-
90
86
  end
91
87
  end
@@ -1,10 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'microsoft_kiota_abstractions'
2
- require_relative './oauth_access_token_provider'
4
+ require_relative 'oauth_access_token_provider'
3
5
 
4
6
  module MicrosoftKiotaAuthenticationOAuth
5
7
  class OAuthAuthenticationProvider < MicrosoftKiotaAbstractions::BaseBearerTokenAuthenticationProvider
6
8
  def initialize(token_request_context, allowed_hosts, scopes)
7
- super(MicrosoftKiotaAuthenticationOAuth::OAuthAccessTokenProvider.new(token_request_context, allowed_hosts, scopes))
9
+ super(MicrosoftKiotaAuthenticationOAuth::OAuthAccessTokenProvider.new(token_request_context, allowed_hosts,
10
+ scopes))
8
11
  end
9
12
  end
10
13
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MicrosoftKiotaAuthenticationOAuth
4
- VERSION = "0.8.0"
4
+ VERSION = '0.18.0' # x-release-please-version
5
5
  end
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "microsoft_kiota_authentication_oauth/version"
4
- require_relative "microsoft_kiota_authentication_oauth/contexts/authorization_code_context"
5
- require_relative "microsoft_kiota_authentication_oauth/contexts/client_credential_context"
6
- require_relative "microsoft_kiota_authentication_oauth/contexts/on_behalf_of_context"
7
- require_relative "microsoft_kiota_authentication_oauth/contexts/oauth_context"
8
- require_relative "microsoft_kiota_authentication_oauth/contexts/oauth_custom_flow"
9
- require_relative "microsoft_kiota_authentication_oauth/extensions/oauth2_ext"
10
- require_relative "microsoft_kiota_authentication_oauth/oauth_access_token_provider"
11
- require_relative "microsoft_kiota_authentication_oauth/oauth_authentication_provider"
3
+ require_relative 'microsoft_kiota_authentication_oauth/version'
4
+ require_relative 'microsoft_kiota_authentication_oauth/contexts/authorization_code_context'
5
+ require_relative 'microsoft_kiota_authentication_oauth/contexts/client_credential_context'
6
+ require_relative 'microsoft_kiota_authentication_oauth/contexts/on_behalf_of_context'
7
+ require_relative 'microsoft_kiota_authentication_oauth/contexts/oauth_context'
8
+ require_relative 'microsoft_kiota_authentication_oauth/contexts/oauth_custom_flow'
9
+ require_relative 'microsoft_kiota_authentication_oauth/extensions/oauth2_ext'
10
+ require_relative 'microsoft_kiota_authentication_oauth/oauth_access_token_provider'
11
+ require_relative 'microsoft_kiota_authentication_oauth/oauth_authentication_provider'
12
12
 
13
13
  module MicrosoftKiotaAuthenticationOAuth
14
14
  end
@@ -1,37 +1,34 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "lib/microsoft_kiota_authentication_oauth/version"
3
+ require_relative 'lib/microsoft_kiota_authentication_oauth/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = "microsoft_kiota_authentication_oauth"
7
- spec.version = MicrosoftKiotaAuthenticationOAuth::VERSION
8
- spec.authors = 'Microsoft Corporation'
9
- spec.email = 'graphsdkpub+ruby@microsoft.com'
6
+ spec.name = 'microsoft_kiota_authentication_oauth'
7
+ spec.version = MicrosoftKiotaAuthenticationOAuth::VERSION
8
+ spec.authors = 'Microsoft Corporation'
9
+ spec.email = 'graphsdkpub+ruby@microsoft.com'
10
10
  spec.description = 'Kiota Authentication implementation with oauth2'
11
11
  spec.summary = 'Microsoft Kiota Authentication OAuth - Kiota Ruby Authentication OAuth library'
12
- spec.homepage = 'https://microsoft.github.io/kiota/'
12
+ spec.homepage = 'https://learn.microsoft.com/openapi/kiota/'
13
13
  spec.license = 'MIT'
14
14
  spec.metadata = {
15
- 'bug_tracker_uri' => 'https://github.com/microsoft/kiota-authentication-oauth-ruby/issues',
16
- 'changelog_uri' => 'https://github.com/microsoft/kiota-authentication-oauth-ruby/blob/main/CHANGELOG.md',
17
- 'homepage_uri' => spec.homepage,
18
- 'source_code_uri' => 'https://github.com/microsoft/kiota-authentication-oauth-ruby',
19
- 'github_repo' => 'ssh://github.com/microsoft/kiota-authentication-oauth-ruby'
15
+ 'bug_tracker_uri' => 'https://github.com/microsoft/kiota-ruby/issues',
16
+ 'changelog_uri' => 'https://github.com/microsoft/kiota-ruby/blob/main/CHANGELOG.md',
17
+ 'homepage_uri' => spec.homepage,
18
+ 'source_code_uri' => 'https://github.com/microsoft/kiota-ruby/tree/main/components/authentication/oauth',
19
+ 'github_repo' => 'ssh://github.com/microsoft/kiota-ruby',
20
+ 'rubygems_mfa_required' => 'true'
20
21
  }
21
- spec.required_ruby_version = ">= 3.0.0"
22
+ spec.required_ruby_version = '>= 3.3.0'
22
23
 
23
- # Specify which files should be added to the gem when it is released.
24
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
24
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
25
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
27
26
  end
28
-
29
- spec.bindir = 'bin'
27
+ spec.bindir = 'bin'
30
28
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
29
  spec.require_paths = ['lib']
32
-
33
- spec.add_runtime_dependency 'microsoft_kiota_abstractions', '~> 0.14.0'
34
- spec.add_runtime_dependency 'oauth2', '~> 2.0'
30
+ spec.add_dependency 'microsoft_kiota_abstractions', MicrosoftKiotaAuthenticationOAuth::VERSION
31
+ spec.add_dependency 'oauth2', '~> 2.0'
35
32
  spec.add_development_dependency 'rake', '~> 13.0'
36
33
  spec.add_development_dependency 'rspec', '~> 3.0'
37
34
  spec.add_development_dependency 'rubocop'
metadata CHANGED
@@ -1,29 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: microsoft_kiota_authentication_oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2023-03-28 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: microsoft_kiota_abstractions
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - "~>"
16
+ - - '='
18
17
  - !ruby/object:Gem::Version
19
- version: 0.14.0
18
+ version: 0.18.0
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
- - - "~>"
23
+ - - '='
25
24
  - !ruby/object:Gem::Version
26
- version: 0.14.0
25
+ version: 0.18.0
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: oauth2
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -86,23 +85,8 @@ executables: []
86
85
  extensions: []
87
86
  extra_rdoc_files: []
88
87
  files:
89
- - ".github/CODEOWNERS"
90
- - ".github/dependabot.yml"
91
- - ".github/workflows/auto-merge-dependabot.yml"
92
- - ".github/workflows/code-ql.yml"
93
- - ".github/workflows/conflicting-pr-label.yml"
94
- - ".github/workflows/projectsbot.yml"
95
- - ".github/workflows/release.yml"
96
- - ".github/workflows/ruby.yml"
97
- - ".gitignore"
98
- - CHANGELOG.md
99
- - CODE_OF_CONDUCT.md
100
88
  - Gemfile
101
- - LICENSE
102
- - README.md
103
89
  - Rakefile
104
- - SECURITY.md
105
- - SUPPORT.md
106
90
  - lib/microsoft_kiota_authentication_oauth.rb
107
91
  - lib/microsoft_kiota_authentication_oauth/contexts/authorization_code_context.rb
108
92
  - lib/microsoft_kiota_authentication_oauth/contexts/client_credential_context.rb
@@ -114,16 +98,16 @@ files:
114
98
  - lib/microsoft_kiota_authentication_oauth/oauth_authentication_provider.rb
115
99
  - lib/microsoft_kiota_authentication_oauth/version.rb
116
100
  - microsoft_kiota_authentication_oauth.gemspec
117
- homepage: https://microsoft.github.io/kiota/
101
+ homepage: https://learn.microsoft.com/openapi/kiota/
118
102
  licenses:
119
103
  - MIT
120
104
  metadata:
121
- bug_tracker_uri: https://github.com/microsoft/kiota-authentication-oauth-ruby/issues
122
- changelog_uri: https://github.com/microsoft/kiota-authentication-oauth-ruby/blob/main/CHANGELOG.md
123
- homepage_uri: https://microsoft.github.io/kiota/
124
- source_code_uri: https://github.com/microsoft/kiota-authentication-oauth-ruby
125
- github_repo: ssh://github.com/microsoft/kiota-authentication-oauth-ruby
126
- post_install_message:
105
+ bug_tracker_uri: https://github.com/microsoft/kiota-ruby/issues
106
+ changelog_uri: https://github.com/microsoft/kiota-ruby/blob/main/CHANGELOG.md
107
+ homepage_uri: https://learn.microsoft.com/openapi/kiota/
108
+ source_code_uri: https://github.com/microsoft/kiota-ruby/tree/main/components/authentication/oauth
109
+ github_repo: ssh://github.com/microsoft/kiota-ruby
110
+ rubygems_mfa_required: 'true'
127
111
  rdoc_options: []
128
112
  require_paths:
129
113
  - lib
@@ -131,15 +115,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
115
  requirements:
132
116
  - - ">="
133
117
  - !ruby/object:Gem::Version
134
- version: 3.0.0
118
+ version: 3.3.0
135
119
  required_rubygems_version: !ruby/object:Gem::Requirement
136
120
  requirements:
137
121
  - - ">="
138
122
  - !ruby/object:Gem::Version
139
123
  version: '0'
140
124
  requirements: []
141
- rubygems_version: 3.4.6
142
- signing_key:
125
+ rubygems_version: 3.6.9
143
126
  specification_version: 4
144
127
  summary: Microsoft Kiota Authentication OAuth - Kiota Ruby Authentication OAuth library
145
128
  test_files: []
data/.github/CODEOWNERS DELETED
@@ -1 +0,0 @@
1
- * @andrueastman @baywet @zengin @MichaelMainer @peombwa @calebkiage @Ndiritu @rkodev
@@ -1,12 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: github-actions
4
- directory: "/"
5
- schedule:
6
- interval: daily
7
- open-pull-requests-limit: 10
8
- - package-ecosystem: bundler
9
- directory: "/"
10
- schedule:
11
- interval: daily
12
- open-pull-requests-limit: 10
@@ -1,32 +0,0 @@
1
- name: Auto-merge dependabot updates
2
-
3
- on:
4
- pull_request:
5
- branches: [ main ]
6
-
7
- permissions:
8
- pull-requests: write
9
- contents: write
10
-
11
- jobs:
12
-
13
- dependabot-merge:
14
-
15
- runs-on: ubuntu-latest
16
-
17
- if: ${{ github.actor == 'dependabot[bot]' }}
18
-
19
- steps:
20
- - name: Dependabot metadata
21
- id: metadata
22
- uses: dependabot/fetch-metadata@v1.3.6
23
- with:
24
- github-token: "${{ secrets.GITHUB_TOKEN }}"
25
-
26
- - name: Enable auto-merge for Dependabot PRs
27
- # Only if version bump is not a major version change
28
- if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}}
29
- run: gh pr merge --auto --merge "$PR_URL"
30
- env:
31
- PR_URL: ${{github.event.pull_request.html_url}}
32
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -1,76 +0,0 @@
1
- # For most projects, this workflow file will not need changing; you simply need
2
- # to commit it to your repository.
3
- #
4
- # You may wish to alter this file to override the set of languages analyzed,
5
- # or to provide custom queries or build logic.
6
- #
7
- # ******** NOTE ********
8
- # We have attempted to detect the languages in your repository. Please check
9
- # the `language` matrix defined below to confirm you have the correct set of
10
- # supported CodeQL languages.
11
- #
12
- name: "CodeQL"
13
-
14
- on:
15
- push:
16
- branches: [ main ]
17
- pull_request:
18
- # The branches below must be a subset of the branches above
19
- branches: [ main ]
20
- schedule:
21
- - cron: '41 2 * * 0'
22
-
23
- jobs:
24
- analyze:
25
- name: Analyze
26
- runs-on: ubuntu-latest
27
- permissions:
28
- actions: read
29
- contents: read
30
- security-events: write
31
-
32
- strategy:
33
- fail-fast: false
34
- matrix:
35
- language: [ 'ruby' ]
36
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
- # Use only 'java' to analyze code written in Java, Kotlin or both
38
- # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
39
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
40
-
41
- steps:
42
- - name: Checkout repository
43
- uses: actions/checkout@v3
44
-
45
- # Initializes the CodeQL tools for scanning.
46
- - name: Initialize CodeQL
47
- uses: github/codeql-action/init@v2
48
- with:
49
- languages: ${{ matrix.language }}
50
- # If you wish to specify custom queries, you can do so here or in a config file.
51
- # By default, queries listed here will override any specified in a config file.
52
- # Prefix the list here with "+" to use these queries and those in the config file.
53
-
54
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
55
- # queries: security-extended,security-and-quality
56
-
57
-
58
- # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
59
- # If this step fails, then you should remove it and run the build manually (see below)
60
- - name: Autobuild
61
- uses: github/codeql-action/autobuild@v2
62
-
63
- # ℹ️ Command-line programs to run using the OS shell.
64
- # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
65
-
66
- # If the Autobuild fails above, remove it and uncomment the following three lines.
67
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
68
-
69
- # - run: |
70
- # echo "Run, Build Application using script"
71
- # ./location_of_script_within_repo/buildscript.sh
72
-
73
- - name: Perform CodeQL Analysis
74
- uses: github/codeql-action/analyze@v2
75
- with:
76
- category: "/language:${{matrix.language}}"
@@ -1,34 +0,0 @@
1
- # This is a basic workflow to help you get started with Actions
2
-
3
- name: PullRequestConflicting
4
-
5
- # Controls when the action will run. Triggers the workflow on push or pull request
6
- # events but only for the master branch
7
- on:
8
- push:
9
- branches: [ main ]
10
- pull_request:
11
- types: [synchronize]
12
- branches: [ main ]
13
-
14
- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
15
- jobs:
16
- # This workflow contains a single job called "build"
17
- build:
18
- # The type of runner that the job will run on
19
- runs-on: ubuntu-latest
20
-
21
- # Steps represent a sequence of tasks that will be executed as part of the job
22
- steps:
23
- - name: check if prs are dirty
24
- uses: eps1lon/actions-label-merge-conflict@releases/2.x
25
- if: env.LABELING_TOKEN != '' && env.LABELING_TOKEN != null
26
- id: check
27
- with:
28
- dirtyLabel: "conflicting"
29
- repoToken: "${{ secrets.GITHUB_TOKEN }}"
30
- continueOnMissingPermissions: true
31
- commentOnDirty: 'This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged.'
32
- commentOnClean: 'Conflicts have been resolved. A maintainer will take a look shortly.'
33
- env:
34
- LABELING_TOKEN: ${{secrets.GITHUB_TOKEN }}
@@ -1,81 +0,0 @@
1
- # This workflow is used to add new issues to GitHub Projects (Beta)
2
-
3
- name: Add PR to project
4
- on:
5
- issues:
6
- types: [opened]
7
- jobs:
8
- track_issue:
9
- runs-on: ubuntu-latest
10
- steps:
11
- - name: Generate token
12
- id: generate_token
13
- uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
14
- with:
15
- app_id: ${{ secrets.GRAPHBOT_APP_ID }}
16
- private_key: ${{ secrets.GRAPHBOT_APP_PEM }}
17
-
18
- - name: Get project data
19
- env:
20
- GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
21
- ORGANIZATION: microsoftgraph
22
- PROJECT_NUMBER: 38
23
- run: |
24
- gh api graphql -f query='
25
- query($org: String!, $number: Int!) {
26
- organization(login: $org){
27
- projectNext(number: $number) {
28
- id
29
- fields(first:20) {
30
- nodes {
31
- id
32
- name
33
- settings
34
- }
35
- }
36
- }
37
- }
38
- }' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
39
-
40
- echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV
41
- echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
42
- echo 'TRIAGE_OPTION_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Needs Triage 🔍") |.id' project_data.json) >> $GITHUB_ENV
43
-
44
- - name: Add Issue to project
45
- env:
46
- GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
47
- ISSUE_ID: ${{ github.event.issue.node_id }}
48
- run: |
49
- item_id="$( gh api graphql -f query='
50
- mutation($project:ID!, $issue:ID!) {
51
- addProjectNextItem(input: {projectId: $project, contentId: $issue}) {
52
- projectNextItem {
53
- id
54
- }
55
- }
56
- }' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectNextItem.projectNextItem.id')"
57
-
58
- echo 'ITEM_ID='$item_id >> $GITHUB_ENV
59
-
60
- - name: Set Triage
61
- env:
62
- GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
63
- run: |
64
- gh api graphql -f query='
65
- mutation (
66
- $project: ID!
67
- $item: ID!
68
- $status_field: ID!
69
- $status_value: String!
70
- ) {
71
- set_status: updateProjectNextItemField(input: {
72
- projectId: $project
73
- itemId: $item
74
- fieldId: $status_field
75
- value: $status_value
76
- }) {
77
- projectNextItem {
78
- id
79
- }
80
- }
81
- }' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value=${{ env.TRIAGE_OPTION_ID }} --silent
@@ -1,45 +0,0 @@
1
- name: Git Release
2
-
3
- on:
4
- push:
5
- tags:
6
- - "v[0-9]+.[0-9]+.[0-9]+"
7
- workflow_dispatch:
8
-
9
- jobs:
10
- Git_Release:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v3
14
- - name: Github Release
15
- uses: anton-yurchenko/git-release@v5.0
16
- env:
17
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
18
- DRAFT_RELEASE: "false"
19
- PRE_RELEASE: "false"
20
- CHANGELOG_FILE: "CHANGELOG.md"
21
- ALLOW_EMPTY_CHANGELOG: "true"
22
-
23
- deploy_prod:
24
- environment:
25
- name: production_feeds
26
- runs-on: ubuntu-latest
27
- steps:
28
- - uses: actions/checkout@v3
29
- - uses: ruby/setup-ruby@v1
30
- with:
31
- ruby-version: '3.2'
32
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
33
- bundler: 'latest'
34
- cache-version: 1
35
- - run: bundle exec rake
36
- - name: Publish to RubyGems
37
- run: |
38
- mkdir -p $HOME/.gem
39
- touch $HOME/.gem/credentials
40
- chmod 0600 $HOME/.gem/credentials
41
- printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
42
- gem build *.gemspec
43
- gem push *.gem
44
- env:
45
- GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -1,34 +0,0 @@
1
- name: Ruby
2
-
3
- on:
4
- workflow_dispatch:
5
- push:
6
- branches: [ main ]
7
- pull_request:
8
-
9
- jobs:
10
- build:
11
- strategy:
12
- fail-fast: false
13
- matrix:
14
- os: [ubuntu-latest, macos-latest]
15
- ruby-version: ['3.0', '3.1', '3.2', head, jruby, jruby-head, truffleruby, truffleruby-head]
16
- runs-on: ${{ matrix.os }}
17
- steps:
18
- - uses: actions/checkout@v3
19
- - uses: ruby/setup-ruby@v1
20
- with:
21
- ruby-version: ${{ matrix.ruby-version }}
22
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
23
- bundler: 'latest'
24
- cache-version: 1
25
- - name: Run tests
26
- run: bundle exec rake
27
- - name: Upload artifacts for ruby version 3 and ubuntu
28
- if: ${{ matrix.os == 'ubuntu-latest' && matrix.ruby-version == '3.2'}}
29
- uses: actions/upload-artifact@v3
30
- with:
31
- name: drop
32
- path: |
33
- ./Gemfile.lock
34
- ./README.md
data/.gitignore DELETED
@@ -1,58 +0,0 @@
1
- *.gem
2
- *.rbc
3
- /.config
4
- /coverage/
5
- /InstalledFiles
6
- /pkg/
7
- /spec/reports/
8
- /spec/examples.txt
9
- /test/tmp/
10
- /test/version_tmp/
11
- /tmp/
12
-
13
- # Used by dotenv library to load environment variables.
14
- # .env
15
-
16
- # Ignore Byebug command history file.
17
- .byebug_history
18
-
19
- ## Specific to RubyMotion:
20
- .dat*
21
- .repl_history
22
- build/
23
- *.bridgesupport
24
- build-iPhoneOS/
25
- build-iPhoneSimulator/
26
-
27
- ## Specific to RubyMotion (use of CocoaPods):
28
- #
29
- # We recommend against adding the Pods directory to your .gitignore. However
30
- # you should judge for yourself, the pros and cons are mentioned at:
31
- # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
- #
33
- # vendor/Pods/
34
-
35
- ## Documentation cache and generated files:
36
- /.yardoc/
37
- /_yardoc/
38
- /doc/
39
- /rdoc/
40
-
41
- ## Environment normalization:
42
- /.bundle/
43
- /vendor/bundle
44
- /lib/bundler/man/
45
-
46
- # for a library or gem, you might want to ignore these files since the code is
47
- # intended to run in multiple environments; otherwise, check them in:
48
- Gemfile.lock
49
- .ruby-version
50
- .ruby-gemset
51
-
52
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53
- .rvmrc
54
-
55
- # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
- # .rubocop-https?--*
57
-
58
- .rspec_status
data/CHANGELOG.md DELETED
@@ -1,38 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [Unreleased]
9
-
10
- ### Added
11
-
12
- ### Changed
13
-
14
- ## [0.8.0] - 2023-03-28
15
-
16
- ### Changed
17
-
18
- - Updated kiota abstractions reference
19
- - Bumped minimum required ruby version to 3.0.
20
-
21
- ## [0.7.0] - 2023-01-17
22
-
23
- ### Changed
24
-
25
- - Removed Microsoft Graph specific defaults.
26
- - Fixed an issue where the access token provider would fail on return.
27
-
28
- ## [0.6.0] - 2023-01-16
29
-
30
- ### Changed
31
-
32
- - Fixed a bug where the authentication provider would fail to load.
33
-
34
- ## [0.5.0] - 2022-12-30
35
-
36
- ### Added
37
-
38
- - Initial public release of the package.
data/CODE_OF_CONDUCT.md DELETED
@@ -1,9 +0,0 @@
1
- # Microsoft Open Source Code of Conduct
2
-
3
- This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4
-
5
- Resources:
6
-
7
- - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8
- - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9
- - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
data/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation.
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 all
13
- 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 THE
21
- SOFTWARE
data/README.md DELETED
@@ -1,53 +0,0 @@
1
- # Kiota OAuth authentication provider library for Ruby
2
-
3
- ![Ruby](https://github.com/microsoft/kiota-authentication-oauth-ruby/actions/workflows/ruby.yml/badge.svg)
4
-
5
- The Kiota OAuth authentication provider library for Ruby is the authentication provider implementation with [OAuth2](https://rubygems.org/gems/oauth2).
6
-
7
- A [Kiota](https://github.com/microsoft/kiota) generated project will need a reference to a authentication provider library to authenticate HTTP requests to an API endpoint.
8
-
9
- Read more about Kiota [here](https://github.com/microsoft/kiota/blob/main/README.md).
10
-
11
- ## Using the OAuth library
12
-
13
- ## Installation
14
-
15
- Add this line to your application's Gemfile:
16
-
17
- ```ruby
18
- gem "microsoft_kiota_authentication_oauth", "0.6.0"
19
- ```
20
-
21
- And then execute:
22
-
23
- ```shell
24
- bundle install
25
- ```
26
-
27
- Or install it yourself as:
28
-
29
- ```shell
30
- gem install microsoft_kiota_authentication_oauth --version "0.6.0"
31
- ```
32
-
33
- ## Contributing
34
-
35
- This project welcomes contributions and suggestions. Most contributions require you to agree to a
36
- Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
37
- the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
38
-
39
- When you submit a pull request, a CLA bot will automatically determine whether you need to provide
40
- a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
41
- provided by the bot. You will only need to do this once across all repos using our CLA.
42
-
43
- This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
44
- For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
45
- contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
46
-
47
- ## Trademarks
48
-
49
- This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
50
- trademarks or logos is subject to and must follow
51
- [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
52
- Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
53
- Any use of third-party trademarks or logos are subject to those third-party's policies.
data/SECURITY.md DELETED
@@ -1,41 +0,0 @@
1
- <!-- BEGIN MICROSOFT SECURITY.MD V0.0.8 BLOCK -->
2
-
3
- ## Security
4
-
5
- Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6
-
7
- If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
8
-
9
- ## Reporting Security Issues
10
-
11
- **Please do not report security vulnerabilities through public GitHub issues.**
12
-
13
- Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
14
-
15
- If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
16
-
17
- You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
18
-
19
- Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20
-
21
- * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22
- * Full paths of source file(s) related to the manifestation of the issue
23
- * The location of the affected source code (tag/branch/commit or direct URL)
24
- * Any special configuration required to reproduce the issue
25
- * Step-by-step instructions to reproduce the issue
26
- * Proof-of-concept or exploit code (if possible)
27
- * Impact of the issue, including how an attacker might exploit the issue
28
-
29
- This information will help us triage your report more quickly.
30
-
31
- If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
32
-
33
- ## Preferred Languages
34
-
35
- We prefer all communications to be in English.
36
-
37
- ## Policy
38
-
39
- Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40
-
41
- <!-- END MICROSOFT SECURITY.MD BLOCK -->
data/SUPPORT.md DELETED
@@ -1,25 +0,0 @@
1
- # TODO: The maintainer of this repo has not yet edited this file
2
-
3
- **REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project?
4
-
5
- - **No CSS support:** Fill out this template with information about how to file issues and get help.
6
- - **Yes CSS support:** Fill out an intake form at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). CSS will work with/help you to determine next steps.
7
- - **Not sure?** Fill out an intake as though the answer were "Yes". CSS will help you decide.
8
-
9
- *Then remove this first heading from this SUPPORT.MD file before publishing your repo.*
10
-
11
- # Support
12
-
13
- ## How to file issues and get help
14
-
15
- This project uses GitHub Issues to track bugs and feature requests. Please search the existing
16
- issues before filing new issues to avoid duplicates. For new issues, file your bug or
17
- feature request as a new Issue.
18
-
19
- For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE
20
- FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER
21
- CHANNEL. WHERE WILL YOU HELP PEOPLE?**.
22
-
23
- ## Microsoft Support Policy
24
-
25
- Support for this **PROJECT or PRODUCT** is limited to the resources listed above.