func (t *Tokens) PostAuth(ctx context.Context, token, hmac string) (string, error) {
	auth := authTokenResponse{}

	req, err := t.client.NewTokenRequest(token, "POST", "/tokens", nil,
		&authTokenHMACRequest{Type: tokenTypeAuth, TokenHMAC: hmac})
	if err != nil {
		log.Printf("Error building http request: %s", err)
		return auth.Token, err
	}

	_, err = t.client.Do(ctx, req, &auth)
	if err != nil {
		log.Printf("Error making api request: %s", err)
	}

	return auth.Token, err
}
// PostAuth requests an auth token from the registry for the provided login
// token value, and it's HMAC.
PostAuth requests an auth token from the registry for the provided login
token value, and it's HMAC.
// PostAuth requests an auth token from the registry for the provided login // token value and it ' s HMAC .
func (t *Tokens) PostAuth(ctx context.Context, token, hmac string) (string, error) {
	auth := authTokenResponse{}
	req, err := t.client.NewTokenRequest(token, "POST", "/tokens", nil,
		&authTokenHMACRequest{Type: tokenTypeAuth, TokenHMAC: hmac})
	if err != nil {
		log.Printf("Error building http request: %s", err)
		return auth.Token, err
	}
	_, err = t.client.Do(ctx, req, &auth)
	if err != nil {
		log.Printf("Error making api request: %s", err)
	}
	return auth.Token, err
}
func ( t * Tokens ) PostAuth ( ctx context . Context , token , hmac string ) ( string , error ) { auth := authTokenResponse { } req , err := t . client . NewTokenRequest ( token , " " , " " , nil , & authTokenHMACRequest { Type : tokenTypeAuth , TokenHMAC : hmac } ) if err != nil { log . Printf ( " " , err ) return auth . Token , err } _ , err = t . client . Do ( ctx , req , & auth ) if err != nil { log . Printf ( " " , err ) } return auth . Token , err }
PostAuth requests an auth token from the registry for the provided login
token value, and it's HMAC.
PostAuth requests an auth token from the registry for the provided login token value and it ' s HMAC .