001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.data.oauth.osm;
003
004/**
005 * The possible scopes for OSM
006 * @author Taylor Smock
007 * @since 18650
008 */
009public enum OsmScopes {
010    /** Read user preferences */
011    read_prefs,
012    /** Modify user preferences */
013    write_prefs,
014    /** Write diary posts */
015    write_diary,
016    /** Modify the map */
017    write_api,
018    /** Read private GPS traces */
019    read_gpx,
020    /** Upload GPS traces */
021    write_gpx,
022    /** Modify notes */
023    write_notes;
024
025    /**
026     * Get the scopes JOSM requests when it is authorized. An OAuth 2.0 application which JOSM is to use must be
027     * registered with at least these.
028     * @return the scopes, in the order they are requested
029     * @since 19707
030     */
031    public static OsmScopes[] getJosmScopes() {
032        return new OsmScopes[] {read_gpx, write_gpx, read_prefs, write_prefs, write_api, write_notes};
033    }
034}