Provides low-level interfaces and helper methods for authentication in Azure SDK
Overall
score
97%
Build a configuration manager that handles authentication credentials consisting of both a name and a secret key. The manager should support secure credential storage, retrieval, and rotation operations.
The configuration manager must:
The manager should include a validation function that can:
@generates
/**
* Creates a new credential manager with initial name and key values.
* @param name - The credential name identifier
* @param key - The secret key value
* @throws Error if name or key is empty or undefined
*/
function createCredentialManager(name: string, key: string): CredentialManager;
/**
* Represents a credential manager instance
*/
interface CredentialManager {
/** Gets the current name value */
getName(): string;
/** Gets the current key value */
getKey(): string;
/**
* Updates both name and key values atomically
* @param newName - The new name value
* @param newKey - The new key value
* @throws Error if newName or newKey is empty or undefined
*/
rotate(newName: string, newKey: string): void;
}
/**
* Validates whether an object is a valid name/key credential
* @param obj - Object to validate
* @returns true if object has name and key properties
*/
function isValidCredential(obj: unknown): boolean;Provides authentication credential interfaces and implementations for Azure services.
Install with Tessl CLI
npx tessl i tessl/npm-azure--core-authdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10