Move credential usage enum to Credential class.
[shibboleth/xmltooling.git] / xmltooling / security / Credential.h
index 42b20d4..36c8b1a 100644 (file)
@@ -53,12 +53,32 @@ namespace xmltooling {
     public:
         virtual ~Credential() {}
         
+        /**
+         * Bitmask constants for limiting resolution process inside a CredentialResolver. 
+         */
         enum ResolveTypes {
             RESOLVE_KEYS = 1,
             RESOLVE_NAMES = 2
         };
 
         /**
+         * Enumeration of use cases for credentials. 
+         */
+        enum UsageTypes {
+            UNSPECIFIED_CREDENTIAL,
+            SIGNING_CREDENTIAL,
+            TLS_CREDENTIAL,
+            ENCRYPTION_CREDENTIAL
+        };
+        
+        /**
+         * Get the credential usage type.
+         * 
+         * @return the usage
+         */
+        virtual UsageTypes getUsage() const=0;
+
+        /**
          * Returns an algorithm identifier for the Credential.
          *
          * @return  the Credential algorithm, or NULL if indeterminate