Sha256: 63e82df7bbd7d355bbb68e8589c25d732aa4c93759a1b356a5efd66f731325c2

Contents?: true

Size: 467 Bytes

Versions: 6

Compression:

Stored size: 467 Bytes

Contents

module PolyglotIos
  module IO
    class Token

      KEYCHAIN_SERVICE = 'polyglot'.freeze
      KEYCHAIN_TOKEN_KEY = 'polyglot_token'.freeze
      
      class << self
        def write(token)
          keychain[KEYCHAIN_SERVICE, KEYCHAIN_TOKEN_KEY] = token
        end
    
        def read
          keychain[KEYCHAIN_SERVICE, KEYCHAIN_TOKEN_KEY]
        end

        def keychain
          @keychain ||= OSXKeychain.new
        end

      end
    end
  end
end
  

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ios_polyglot_cli-2.2.2 lib/ios_polyglot_cli/io/token.rb
ios_polyglot_cli-2.2.1 lib/ios_polyglot_cli/io/token.rb
ios_polyglot_cli-2.2.0 lib/ios_polyglot_cli/io/token.rb
ios_polyglot_cli-2.1.1 lib/ios_polyglot_cli/io/token.rb
ios_polyglot_cli-2.1.0 lib/ios_polyglot_cli/io/token.rb
ios_polyglot_cli-2.0.1 lib/ios_polyglot_cli/io/token.rb