Definition
(Classifying Stack.) Let \(G\to S\) be a smooth affine group scheme over a scheme \(S\). The classifying stack \(BG\) of \(G\to S\) is the category over \(\Sch/S\) whose objects are principal G-bundles \(P\to T\) and a morphism \((P'\to T') \to (P\to T)\) is the data of a \(G\)-equivariant morphism \(P'\to P\) such that
is Cartesian.