RegistryDashboard

Authentication

Session management and authentication state. Login, logout, and credential inspection.

4 methods

client.login()

Authenticate with email and password. Returns a session token and installs it on the client for subsequent requests.

emailrequiredstringemail

User email address.

passwordrequiredstring

User password.

sessionTokenrequiredstring

JWT session token for subsequent requests.

expiresAtoptionalstringdate-time

Token expiration timestamp (ISO 8601).

login(email: string, password: string): Promise<{ sessionToken: string; expiresAt?: string }>
typescript
import { RegistryClient } from '@uluops/registry-sdk';

const client = new RegistryClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.login('user@example.com', 'SecurePass123!');

console.log(result.sessionToken);
Response Type
// Promise<{ sessionToken: string; expiresAt?: string }>
{
  sessionToken: string;
  expiresAt?: string;
}

client.clearLocalSession()

Clear the session token from the client. Does not revoke the token server-side — use the ops-sdk's logout() for server-side revocation.

clearLocalSession(): void
typescript
import { RegistryClient } from '@uluops/registry-sdk';

const client = new RegistryClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.clearLocalSession();
Response Type
void

client.isAuthenticated()

Check whether the client currently holds a valid credential (API key or session token).

isAuthenticated(): boolean
typescript
import { RegistryClient } from '@uluops/registry-sdk';

const client = new RegistryClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.isAuthenticated();
Response Type
boolean

client.getAuthType()

Get the type of credential currently configured on the client.

getAuthType(): 'api_key' | 'session' | null
typescript
import { RegistryClient } from '@uluops/registry-sdk';

const client = new RegistryClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.getAuthType();
Response Type
'api_key' | 'session' | null