Created
October 4, 2012 12:45
-
-
Save matzew/3833331 to your computer and use it in GitHub Desktop.
AGAuthenticationManager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* AGAuthenticationManager manages different AGAuthenticationModule implementations. It is basically a | |
* factory that hides the concrete instanciation of a specific AGAuthenticationModule implementation. | |
* The class offers simple APIs to add, remove or get access to a 'authentication module'. | |
* | |
*/ | |
@interface AGAuthenticationManager : NSObject | |
/** | |
* A factory method to instantiate an empty AGAuthenticationManager. | |
* | |
* @return the AGAuthenticationManager object | |
*/ | |
+(id) manager; | |
/** | |
* Creates a new default (REST) AGAuthenticationModule implemention. | |
* | |
* @param moduleName The name of the actual auth module object. | |
* @param baseURL the base url for the server. | |
*/ | |
-(id<AGAuthenticationModule>)add:(NSString*) moduleName baseURL:(NSURL*)baseURL; | |
/** | |
* Creates a new AGAuthenticationModule implemention. The actual type is determined by the type argument. | |
* | |
* @param moduleName The name of the actual auth module object. | |
* @param baseURL the base url for the server. | |
* @param type The type of the new auth module object. | |
*/ | |
-(id<AGAuthenticationModule>)add:(NSString*) moduleName baseURL:(NSURL*)baseURL type:(NSString*) type; | |
/** | |
* Removes a AGAuthenticationModule implemention from the AGAuthenticationManager. The auth module, | |
* to be removed is determined by the moduleName argument. | |
* | |
* @param moduleName The name of the actual auth module object. | |
*/ | |
-(id<AGAuthenticationModule>)remove:(NSString*) moduleName; | |
/** | |
* Loads a given AGAuthenticationModule implemention, based on the given moduleName argument. | |
* | |
* @param moduleName The name of the actual auth module object. | |
*/ | |
-(id<AGAuthenticationModule>)get:(NSString*) moduleName; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment