Module: MicrosoftKiotaAuthenticationOAuth::OAuthCustomFlow

Included in:
OAuthContext
Defined in:
lib/microsoft_kiota_authentication_oauth/contexts/oauth_custom_flow.rb

Overview

Module that can be optionally implemented for supporting custom token grant flows. To use a cutsom token grant flow, implement the functions below and use MicrosoftKiotaAuthenticationOAuth::OAuthContext.new as your token_request_context object for the use by the MicrosoftKiotaAuthenticationOAuth::OAuthAccessTokenProvider

Class Method Summary collapse

Class Method Details

.get_oauth_providerObject

Function that returns an oauth client using the oauth2 gem

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/microsoft_kiota_authentication_oauth/contexts/oauth_custom_flow.rb', line 12

def self.get_oauth_provider
    raise NotImplementedError.new
end

.get_scopesObject

Function that returns a space seperated string of scopes, beginning with the offline_access scope if relevant

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/microsoft_kiota_authentication_oauth/contexts/oauth_custom_flow.rb', line 18

def self.get_scopes
    raise NotImplementedError.new
end

.get_tokenObject

Function that returns the access token

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/microsoft_kiota_authentication_oauth/contexts/oauth_custom_flow.rb', line 23

def self.get_token 
    raise NotImplementedError.new
end