Isomorphism class of locally trivial object classified by some $H^1$ ? Hello,
I have noticed some fact about cohomologie : when i have some kind of strucutre in a topos (for example the $G$-object for $G$ a group object in the topos) and a particular object $X$ model of this strucutre such that the sheaf of automorphism of $X$ is a sheaf of commutative group, Then there is (at least on a lot of examples) a bijection between isomorphism class of model of this structure which are locally isomorphic to $X$ and $H^1(T,G)$.
Examples I have in mind are the representation of dimension 1 of a group $G$ over a field $k$ which correspond in one hand to one dimensional $k$-vector space in the topos of $G$-set and on the other hand to the cohomology group $H^1(G-set,k^*) $.
Or the principal bundle over a topological space $X$ which corresponds to some $H^1(X,G)$ too.
Is there a "general explication" to those facts ? I mean by that a result valid on an arbitrary topos who gave a bijection between a $H^1(T,G)$ and isomorphism class of objects internally isomorph. 
And Is there "higher dimensional" generalization ? ( I am working on an example which seem to involve a 2-category of object inside a topos $T$ and where "equivalence class" of objects "localy equivalent" seem to be classified by some $H^2$ group in a way that i don't understand yet... )
Thank you !
 A: It is a general fact that if you consider an abelian group $A$ in topos $T$, then equivalence classes of $A$-torsors in $T$ are classified by cohomology group $H^1(T;A)=Ext^1_T(\mathbb{Z},A)$. Here $\mathbb{Z}$ is a free abelian group generated by final object $1\in T$ and ext-group can be defined in a classical way using injective resolutions. $A$-torsor is an object $X$ equipped with an action $\alpha: X\times A\to X$, such that $X\to 1$ is epimorphism and $< \alpha, \pi_1 >: X\times A \to X \times X$ is isomorphism. See P.T. Johnstone, "Topos theory", chapter 8.
One-dimensional representations of $G$ over $\mathbb{k}$ are just $\mathbb{k}^*$-torsors in a category of $G$-sets, so general theory applies in your example.
I am not familiar with higher classification theory, although I am sure it exists. In p.8.3 of Johnstone's book there's some talk on higher classifying spaces in toposes and associated cohomology theories. There is also Jacob Lurie's book "Higher topos theory", which, I assume, deals with higher cohomology theories, although I didn't read it yet.
