ProfileManager¶
Manage profile storage and retrieval.
Getting Instance¶
import { getProfileManager } from '@robinmordasiewicz/f5xc-auth';
const profileManager = getProfileManager();
Methods¶
list(): Promise<string[]>¶
List all available profile names.
load(name: string): Promise<Profile | null>¶
Load a specific profile.
const profile = await profileManager.load('production');
if (profile) {
console.log('Loaded profile:', profile.name);
}
save(profile: Profile): Promise<void>¶
Save a new or updated profile.
await profileManager.save({
name: 'production',
apiUrl: 'https://mytenant.console.ves.volterra.io',
apiToken: 'token',
defaultNamespace: 'my-ns'
});
delete(name: string): Promise<void>¶
Delete a specific profile.
getActiveProfile(): Promise<Profile | null>¶
Get the currently active profile.
setActive(name: string): Promise<void>¶
Set a profile as active.
deleteActive(): Promise<void>¶
Delete the active profile marker.
isActive(name: string): Promise<boolean>¶
Check if a specific profile is active.
See Also¶
- Profile Management Guide - Usage examples
- Authentication - Configure authentication methods
- Profile Switcher Example - Real-world example