001/* 002 * flattr4j - A Java library for Flattr 003 * 004 * Copyright (C) 2011 Richard "Shred" Körber 005 * http://flattr4j.shredzone.org 006 * 007 * This program is free software: you can redistribute it and/or modify 008 * it under the terms of the GNU General Public License / GNU Lesser 009 * General Public License as published by the Free Software Foundation, 010 * either version 3 of the License, or (at your option) any later version. 011 * 012 * Licensed under the Apache License, Version 2.0 (the "License"); 013 * you may not use this file except in compliance with the License. 014 * 015 * This program is distributed in the hope that it will be useful, 016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 018 */ 019package org.shredzone.flattr4j.oauth; 020 021import java.lang.annotation.Documented; 022import java.lang.annotation.ElementType; 023import java.lang.annotation.Retention; 024import java.lang.annotation.RetentionPolicy; 025import java.lang.annotation.Target; 026 027/** 028 * Annotates that authentication is required for invocating this call, and lists the 029 * scopes that are required. 030 * 031 * @author Richard "Shred" Körber 032 */ 033@Target(ElementType.METHOD) 034@Retention(RetentionPolicy.RUNTIME) 035@Documented 036public @interface RequiredScope { 037 038 /** 039 * Set of scopes that are required to invoke the annotated call. An empty result 040 * means that only authentication is required. 041 */ 042 Scope[] value() default {}; 043 044}