#mruby-bnet-authenticator mruby implementation of the Battle.net Mobile Authenticator ℹ️.
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
vendor/bigd*.*
)
BigDigits multiple-precision arithmetic library (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.