Skip to content

Conversation

@sameerkhanna
Copy link

  • Fixed a bug in both authentication methods where checking client_type was being done improperly, thus defaulting to 'confidential' even if 'client_type' was set to 'public'. There is no mention of the 'confidential' attribute in clientgetter(), I believe you meant to check 'client_type' instead.
  • Added swp extension to .gitignore

@sameerkhanna
Copy link
Author

Actually I'm going to retract this, I don't believe this fixed anything actually, my bad. I'm not sure where the 'confidential' attribute gets set... perhaps someone can clarify.

@Taar
Copy link
Contributor

Taar commented Jun 19, 2013

I believe you might be correct in say that it's a bit bugged. I'm not 100% sure why client.confidential is being checked, since the client isn't expected to have that attribute. I believe it should be changed too the following:

        if client.client_type != 'confidential':
            log.debug('Authenticate client failed, not confidential.')
            return False
        log.debug('Authenticate client success.')

I made the changes and uploaded a new branch called confidential. Tests pass, so I guess the change didn't effect anything :)

I would like @lepture to look at it and clarify why that check was there.

@lepture
Copy link
Owner

lepture commented Jun 19, 2013

First, it is not a bug, it is a over-design. For example:

class Client(object):
    client_type = 'secret'

    @property
    def confidential(self):
        return 'secret'

You can define your client_type as secret, and change the confidential keyword to secret.

lepture added a commit that referenced this pull request Jun 19, 2013
Possible fix for pull request #17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants