Sha256: 1a512c61459a24e067b5aa7859b01cec67703a9d8b01d41956f5aaf1d0f72eb6

Contents?: true

Size: 1.85 KB

Versions: 4

Compression:

Stored size: 1.85 KB

Contents

# AuthTokenStoreProvider

[![Gem Version](https://badge.fury.io/rb/sauthentication_token_store.png)](https://badge.fury.io/rb/authentication_token_store)

This gem provides authentication token storage client library in order to interface with the authentication token storage service.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'auth_token_store_provider'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install authentication_token_store --source http://gems.hetzner.co.za


## Testing

Locally run the tests:

    $ bundle exec rspec -cfd spec/*


## Usage

### StubClient
  ```
  provider = AuthTokenStoreProvider::StubClient.new
  ```
### Adding a token
```
  provider.add(token_identifier: '4603547ba5bdc6',
               authenticated_identifier: 'uuid123',
               token_issue_time: '2017-01-11T14:00:36+02:00',
               token_expiry_time: '2017-01-12T14:00:36+02:00')
```

### Removing a token
```
  provider.remove(token_identifier: '4603547ba5bdc6')
```

### Removing all tokens for a authenticated_identifier
```
  provider.remove_tokens_for(authenticated_identifier: 'uuid123')
```

### Determine if a token exist
```
provider.token_exist?(
  token_identifier: '4603547ba5bdc6',
  authenticated_identifier: 'uuid123',
  token_issue_time:  '2017-01-11T14:00:36+02:00',
  token_expiry_time: '2017-01-12T14:00:36+02:00'
)
```

### List all tokens for a authenticated_identifier
```
provider.subject.list_tokens_for(authenticated_identifier: 'uuid123')
```

## Detailed example



## Contributing

Bug reports and feature requests are welcome by email to barney dot de dot villiers at hetzner dot co dot za. This gem is sponsored by Hetzner (Pty) Ltd (http://hetzner.co.za)

## Notes



## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
auth_token_store_provider-1.2.1 README.md
auth_token_store_provider-1.2.0 README.md
auth_token_store_provider-1.1.0 README.md
auth_token_store_provider-1.0.1 README.md