Back to project page roodroid.
The source code is released under:
Copyright (c) 2011, Jonathan Perichon & Lucas Gerbeaux Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"...
If you think the Android project roodroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package fr.utbm.roodroid.server; //from w ww.j a v a 2s .c om import java.util.HashSet; import java.util.Set; /** * AuthByID * Extends AuthMethod. * * Checks if an username is allowed or not. * The list of allowed usernames is stored as preferences by the ApplicationManager. * * @author Jonathan Perichon <jonathan.perichon@gmail.com> * @author Lucas Gerbeaux <lucas.gerbeaux@gmail.com> * */ public class AuthByID implements AuthMethod { private Set<String> authorizedIds; public AuthByID(Set<String> ids) { authorizedIds = new HashSet<String>(ids); } @Override public boolean isAuthorized(String value) { return authorizedIds.contains(value); } }