Sha256: c2681c05da262dd257948728581b219ed5307b3dc77f2d07639ffecc654ffd9e
Contents?: true
Size: 766 Bytes
Versions: 25
Compression:
Stored size: 766 Bytes
Contents
module ResoTransport module Authentication # This base class defines the basic interface support by all client authentication implementations. class AuthStrategy attr_reader :access # @abstract Perform requests to authenticate the client with the API # @return [Access] The access token object def authenticate(*) raise NotImplementedError, 'Implement me!' end # Ensure that a valid access token is present or raise an exception # @raise [ResoWebApi::Errors::AccessDenied] If authentication fails def ensure_valid_access! @access = authenticate unless access && access.valid? access end # Resets access def reset @access = nil end end end end
Version data entries
25 entries across 25 versions & 1 rubygems