[[auth:intro|Intro]] [[auth:ex1|Ex1]] [[auth:ex2|Ex2]] [[auth:ex3|Ex3]] [[auth:ex4|Ex4]]====== Authentication: Intro ====== In these exercises, we will use AspectJ and annotations to protect the access to a number of methods in the figure editor application. ===== Set-up & Running ===== You can reuse the AspectJ project with the figure editor application you have created during the previous track. If you haven't got such a project yet, consult the [[invariant:intro|Invariants: Intro]] page. ===== @Authenticated Annotation ===== Have a look at the annotation defined as ''Authenticated'' inside the package ''figures.annotations''. It is used to mark methods and constructors to which we want to restrict access. The ''Role'' enumeration is used to mark different roles with an increasing clearance level: user, supervisor and administrator. You can find out where this annotation is being used by right-clicking it and selecting **References** -> **Project**. Note that we have already employed this annotation to mark the following access restrictions: - Points can only be created and moved by authenticated users (or supervisors, or administrators). - Lines can only be created by authenticated users (or supervisors, or administrators); they can only be moved by supervisors (or administrators). In this track, we will use aspects to enforce the access restriction specified by these annotations. ---- Start the track at [[auth:ex1|Exercise 1]].