Let $H^s: = H^s([0,2\pi])$ be the (periodic) Sobolev space on the interval $[0,2\pi]$ with the norm $|| \cdot ||_{H^s([0,2\pi])}$ given by $$ ||\phi||_{H^s} := \bigg(\sum_{n\in \mathbb{Z}}(1+|n|^{2s})|\hat \phi_n|^2\bigg)^{1/2}, $$ where $\{\hat \phi_n\}_{n \in \mathbb{Z}}$ are the Fourier coefficients of $\phi$.
Is the duality pairing between $H^{-1/2}$ and $H^{1/2}$ always just the regular $L^2$ inner product? I.e, for $\phi \in H^{1/2}$ and $\psi \in H^{-1/2}$ is $$ \langle \phi, \psi \rangle_{H^{1/2}\times H^{-1/2}} = \int_0^{2\pi}\phi(x) \overline{\psi(x)} dx = \sum_{n \in \mathbb{Z}}\hat \phi_n \ \overline{\hat \psi_n}, $$ or do we need some extra conditions for this to hold? In what situations can we identify the duality pairing and the $L^2$ inner product?