dorentus / mruby-bnet-authenticator

mruby gem of the Battle.net Mobile Authenticator client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#mruby-bnet-authenticator mruby implementation of the Battle.net Mobile Authenticator ℹ️.

Build Status

Installation, by mrbgems

  • add conf.gem line to build_config.rb
MRuby::Build.new do |conf|

    # ... (snip) ...

    conf.gem :github => 'iij/mruby-digest'
    conf.gem :github => 'iij/mruby-io'
    conf.gem :github => 'iij/mruby-socket'
    conf.gem :github => 'iij/mruby-regexp-pcre'
    conf.gem :github => 'iij/mruby-pack'
    conf.gem :github => 'dorentus/mruby-bnet-authenticator'
end

Usage

Initialize an authenticator with given serial and secret

authenticator = Bnet::Authenticator.new('CN-1402-1943-1283', '4202aa2182640745d8a807e0fe7e34b30c1edb23')
puts authenticator

Get a token

authenticator.get_token

Request a new authenticator from server

authenticator = Bnet::Authenticator.request_authenticator(:US)

Restore an authenticator from server

authenticator = Bnet::Authenticator.restore_authenticator('CN-1402-1943-1283', '4CKBN08QEB')

License

mruby-bnet-authenticator

under the MIT License

  • see LICENSE file

BigDigits multiple-precision arithmetic library (vendor/bigd*.*)

Contains multiple-precision arithmetic code originally written by David Ireland, copyright (c) 2001-13 by D.I. Management Services Pty Limited <www.di-mgt.com.au>, and is used with permission. Link: Cryptography Software Code.

About

mruby gem of the Battle.net Mobile Authenticator client

License:MIT License


Languages

Language:Ruby 85.6%Language:C 14.4%