Taking credit for supervising a PhD student while I am a postdoc I am nearly done with my PhD and I am excited to the phase where I supervise PhD theses. However in Germany, I can be the official supervisor of a PhD student only if I am a professor. 

I will probably write project proposals for grants and such, and hopefully through those I can hire PhD students. And I am sure my current supervisor would be happy if I share with him the load of supervising new PhD students. 

Let's say I start supervising (or co-supervising) a PhD student after one of those two scenarios above. The question is, how can I take credit for supervising that student if I am not yet a professor? 

Surely we'll be writing papers together and I'll benefit from that. But I wonder if it would be okay to say in a future interview or in my CV: I supervised a PhD student while I was a post doc.
If you are not yet a professor, you will most likely not yet be the sole one supervising, so there should be a professor who is officially assigned to supervise this student. It might be that you do all the work and the professor is only there on paper, however, he is still the one responsible.
Thus, I would suggest to state in the CV that you assisted professor X in supervising PhD students. Most people will be well aware that this means that you did most of the supervising work, however doing it this way you do not claim something that you (officially) shouldn't be doing.
If you want, ask the professor to write a letter of recommendation emphasizing the fact that you did most of the work.