# Module: opera_auth

## About this module

The opera_auth module contains the code for doing authentication with Link and Unite.

## Interface overview and API documentation

API documentation generated by Doxygen contains all necessary information for the external APIs.

## Implementation description

API documentation generated by Doxygen contains information about the internal organization of the module.

### Footprint

The module is rather small. It can be enabled and disabled using the FEATURE_OPERA_AUTH feature.

### Dynamic memory use and OOM handling

OOM policies

  All the functions handle OOM by returning a status to the caller.

Who handles OOM?

  There is no particular OOM handling. A failure code is returned to the caller, which is expected to exit with a failure code of its own.

Flow

  An authentication request uses the g_transferManager to initiate a HTTPS request. On completion of the request, the result is analyzed and a listener callback is called.

Heap memory usage

  No sizeable heap memory used.

Stack memory usage

  No sizeable stack memory used.

Static memory usage

  No sizeable static memory used.

Caching and freeing memory

  No caching used.

Freeing memory on exit

  Memory is freed on exit.

Temp buffers

  No temp buffers used.

Memory tuning

  Nothing to tune.

Tests

  None.

Coverage

  A successful authentication would exercise a lot of code. However, it is not feasible to put this in a selftest

Design choices

  Due to usage in desktop, the old OperaAuthentication interface remains in a backwards compatible form. However, as this API has some limitations it has been replaced by the CoreOperaAccountManager API which is a back-end for the DOM_OperaAccountManager interface. This new API completely hides the old implementation.

Improvements

  At present, no improvments are planned.