sPFFramework/src/main/java/it/polimi/spf/framework/security/SPFSecurityMonitor.java
public AppAuth validateAccess(String accessToken, Permission permission) throws TokenNotValidException, PermissionDeniedException {
		AppAuth appAuth;
		if (accessToken == null) {
			throw new TokenNotValidException();
		}

		appAuth = mAppRegistry.getAppAuthorization(accessToken);

		if ((appAuth.getPermissionCode() & permission.getCode()) == 0) {
			throw new PermissionDeniedException();
		}

		return appAuth;
	}
public AppAuth validateAccess(String accessToken, Permission permission) throws TokenNotValidException, PermissionDeniedException {
		AppAuth appAuth;
		if (accessToken == null) {
			throw new TokenNotValidException();
		}

		appAuth = mAppRegistry.getAppAuthorization(accessToken);

		if ((appAuth.getPermissionCode() & permission.getCode()) == 0) {
			throw new PermissionDeniedException();
		}

		return appAuth;
	}
Local app security