Sha256: 49abb1627b985d2bd62612fb63511bc7b5fb1abac362a3c9a9b5363502a15e7f

Contents?: true

Size: 550 Bytes

Versions: 7

Compression:

Stored size: 550 Bytes

Contents

# frozen_string_literal: true

require_relative 'auth_strategy'

module Redd
  module AuthStrategies
    # A userless authentication scheme.
    class Userless < AuthStrategy
      # Perform authentication and return the resulting access object
      # @return [Access] the access token object
      def authenticate
        request_access('client_credentials')
      end

      # Refresh the authentication and return the refreshed access
      # @return [Access] the new access
      def refresh(_)
        authenticate
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
redd-0.8.8 lib/redd/auth_strategies/userless.rb
redd-0.8.7 lib/redd/auth_strategies/userless.rb
redd-0.8.6 lib/redd/auth_strategies/userless.rb
redd-0.8.5 lib/redd/auth_strategies/userless.rb
redd-0.8.4 lib/redd/auth_strategies/userless.rb
redd-0.8.3 lib/redd/auth_strategies/userless.rb
redd-0.8.2 lib/redd/auth_strategies/userless.rb