Skip to content

Authentication necessity check function based on cache #178

@alpineyahoo

Description

@alpineyahoo

I would like to write a script in which oauth2l is used. In the script I'd like to write conditional codes depending on authentication necessity (I mean, whether it is necessary to open the consent page on a browser or not). Currently oauth2l doesn't provide such a function and if you want to know whether it is necessary you have to run:

oauth2l fetch --scope <scope_name> --cache /path/to/cache --credentials /path/to/credentials.json

and see whether this message comes up:

Go to the following link in your browser:

 https://accounts.google.com/o/oauth2/auth?......

This is inconvenient when embedding oauth2l in scripts. I would like oauth2l to provide a function which checks authentication necessity based on cache. Sadly you don't seem to be able to extract token from cache, so oauth2l test command doesn't help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions