state/apiserver/common: Authorizer remove GetAuthEntity method

This PR is part of a series of cleanups to the apiserver Authorizer interface. The intent of this PR is to remove the AuthEntity method from the Authorizer interface, forcing everything to use the Tag instead. 

In the real srvRoot authorizer this tag is derived from the entity, in the testing/fakeauthorizer the tag itself is the primary data item.

Discussion: https://lists.ubuntu.com/archives/juju-dev/2014-July/003104.html
nope, probably not. but given we're switching on the type of the tag, it
almost begs to use the switch statement :)


On Thu, Aug 14, 2014 at 5:46 PM, Frank Mueller <notifications@github.com>
wrote:

> In state/apiserver/agent/agent.go:
>
> > @@ -96,11 +99,19 @@ func (api *API) IsMaster() (params.IsMasterResult, error) {
> >  		return params.IsMasterResult{}, common.ErrPerm
> >  	}
> >
> > -	session := api.st.MongoSession()
> > -	machine := api.auth.GetAuthEntity().(*state.Machine)
> > +	switch tag := api.auth.GetAuthTag().(type) {
>
> Type switch with only one type. Will there be more in future?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/juju/juju/pull/516/files#r16225028>.
>