import { AuthenticationResponse } from './api/authentication.response.model';

export interface Authentication {
  idToken: string;
  expiresIn: number;
}

export function mapAuthApiResponseToAuthenticationResult(data: AuthenticationResponse): Authentication {
  const { id_token, expires_in } = data;
  return {
    idToken: id_token,
    expiresIn: expires_in,
  };
}
