lib/game_machine/handlers/authentication.rb in game_machine-0.0.11 vs lib/game_machine/handlers/authentication.rb in game_machine-1.0.2

- old
+ new

@@ -21,26 +21,18 @@ authtoken_for_player(player_id) end def authtoken_for_player(player_id) - Application.auth_handler.authtoken_for(player_id) + Handlers::PlayerAuthentication.instance.authtoken_for(player_id) end def valid_authtoken?(player) - return true if public? player.authtoken == authtoken_for_player(player.id) end - def public? - Application.config.auth_handler == 'GameMachine::AuthHandlers::Public' - end def authenticate!(player) - if public? - AUTHENTICATED_USERS[player.id] = player.authtoken - return true - end @player = player if valid_authtoken?(player) register_player(player.id) player.set_authenticated(true) else