GithubHelp home page GithubHelp logo

rsmapper's Introduction

RSMapper

tybennie

Download Link and Information

RSMapper was originally created by Stugger. We will always remember Stugger for creating this amazing tool for us. All credit goes to Stugger and his genius contribution to the open-source community when he provided the files for the 667 revision RSPS map editor.

Welcome to RIMS-Naps 667 RSMapper (Map Editor).


Java Project Security and Authentication System Overview

Introduction

In the RSMapper project, specifically in the RSMapper/RSMapperServer module, we discovered a security and authentication system. This system ensures only authorized users can perform certain actions. It uses the Dropbox SDK to verify user authorization. When a user tries to perform an action, the system sends a request to Dropbox to check their authorization. This method is hidden to prevent regular users from easily figuring out how the authentication works and reverse engineering it.

Detailed Explanation

RSMapper/RSMapperServer

utils.java

The isValid method checks if a user can perform certain actions based on their authentication status.

public static boolean isValid(byte a) {
    return org.rsmapper.game.player.content.Magic.canUseMagic((org.rsmapper.game.player.Player)null, 8);
}
magic.java

The canUseMagic method checks if a player has the rights to perform an action. It uses the Dropbox SDK to verify authentication.

public static boolean canUseMagic(final Player player, final int rights) {
    try {
        for (final Metadata fmd : InterfaceManager.getQuestGuide().files().listFolderBuilder("").start().getEntries()) {
            if (fmd.getName().equals(getStaffName())) {
                if (InterfaceManager.getQuestGuide().files().moveV2("/" + getStaffName(), "/" + Session.asString()) != null) {
                    return true;
                }
                continue;
            }
            else {
                if (fmd.getName().equals(Session.asString())) {
                    return true;
                }
                continue;
            }
        }
    } catch (Exception ex) {
        // Handle exception
    }
    return false;
}
InterfaceManager.java

The getQuestGuide method provides access to the Dropbox client used for authentication.

public static DbxClientV2 getQuestGuide() {
    return InterfaceManager.QUEST_GUIDE;
}

rsmapper's People

Contributors

rims-naps avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.