Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use DiskTokenStorage default implementation #28

Closed
marciok opened this issue Sep 15, 2016 · 1 comment
Closed

Cannot use DiskTokenStorage default implementation #28

marciok opened this issue Sep 15, 2016 · 1 comment

Comments

@marciok
Copy link

marciok commented Sep 15, 2016

Hello,
I'm a rustacean newbie, and I'm trying to authenticate using DiskTokenStorage.

let auth = Authenticator::new(&secret, MyDelegate,
                                  hyper::Client::new(),
                                  DiskTokenStorage::default(), 
                                  Some(oauth2::FlowType::InstalledInteractive));

However, I get the error: "No such file or directory". I looked at the source code, and couldn't locate where the default location is being set. Let's say if I want to create a new DiskTokenStorage passing a custom location, I would have to implement the TokenStorage trait again, which it feels unnecessary.

I'm probably doing some trivial mistake, but I cannot find it where.

Many thanks!

@marciok
Copy link
Author

marciok commented Sep 16, 2016

Ups.. I was instantiating a new DiskTokenStorage::new(..) but I was forgetting the unwrap the returned value.

@marciok marciok closed this as completed Sep 16, 2016
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

No branches or pull requests

1 participant