Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Bugs when sending to everyone #11

Open
@ArthurHlt

Description

@ArthurHlt

First I'm not sure if I should V1 or V2, the second version seems not ready to send emails, is that correct ?

In the v1 I can't send emails to /everyone, I have this error:
{"errors":["UAA Failure: 401 {\"error\":\"invalid_token\",\"error_description\":\"Invalid access token value, must be at least 30 characters:\"}"]}

I first thought about how I handled client in my UAA, but everything seems correct so I started digging inside the code.

It appears that in uaa package token is never given to the uaa client, see: https://github.com/cloudfoundry-incubator/notifications/blob/master/uaa/uaa.go#L94-L96

But token is passed in UsersEmailsByIDs function: https://github.com/cloudfoundry-incubator/notifications/blob/master/uaa/uaa.go#L58

By looking in vendor https://github.com/cloudfoundry-incubator/notifications/blob/master/vendor/github.com/pivotal-cf/uaa-sso-golang/uaa/all_users.go it looks like it will never tried to have a token if it's not already set. So obviously trying to retrieve all users will always fail.

I've patched myself from my side by giving the token to client which make it works.

Do you want a PR for this ? Or is it kind of wanted ?

Activity

cf-gitbot

cf-gitbot commented on Oct 2, 2017

@cf-gitbot

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

iplay88keys

iplay88keys commented on Dec 21, 2017

@iplay88keys
Contributor

Hey @ArthurHlt!

We are currently supporting v1.
PRs are welcome! We'll try to merge it in as soon as possible! Please reference this issue in your PR. We highly recommend adding a test to reproduce this behavior.

Thank you!
Jeremy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Bugs when sending to everyone · Issue #11 · cloudfoundry/notifications