Add simple Bearer authenticator filter for Kube

Now with 100% more implementation. Step 1 of implementing #1430.  Sourced from https://github.com/smarterclayton/origin/commit/b3ccda08e51a4b129348244e7b6c03ccc54750f3

@erictune
It's a bit like http.HandlerFunc.  Aids consumers and tests.  Not truly critical (although I'd hate for people to duplicate it).


> On Oct 2, 2014, at 7:31 PM, erictune <notifications@github.com> wrote:
> 
> In pkg/auth/authenticator/interfaces.go:
> 
> > +// Token checks a string value against a backing authentication store and returns
> > +// information about the current user and true if successful, false if not successful,
> > +// or an error if the token could not be checked.
> > +type Token interface {
> > +	AuthenticateToken(token string) (api.UserInfo, bool, error)
> > +}
> > +
> > +// Request attempts to extract authentication information from a request and returns
> > +// information about the current user and true if successful, false if not successful,
> > +// or an error if the token could not be checked.
> > +type Request interface {
> > +	AuthenticateRequest(req *http.Request) (api.UserInfo, bool, error)
> > +}
> > +
> > +// TokenFunc is a function that implements the Token interface.
> > +type TokenFunc func(token string) (api.UserInfo, bool, error)
> Does this and the rest of the funcs types below need to be public?
> 
> —
> Reply to this email directly or view it on GitHub.