Class | Fog::Brightbox::OAuth2::CredentialSet
In: | lib/fog/brightbox/oauth2.rb
Parent: | Object

Encapsulates credentials required to request access tokens from the Brightbox authorisation servers

@todo Interface to update certain credentials (after password change)

### Methods

access_token? best_grant_strategy new refresh_token? update_tokens user_details?

### Attributes

access_token | [R] |
client_id | [R] |
client_secret | [R] |
password | [R] |
refresh_token | [R] |
username | [R] |

### Public Class methods

new(client_id, client_secret, options = {})

@param [String] client_id @param [String] client_secret @param [Hash] options @option options [String] :username @option options [String] :password

### Public Instance methods

access_token?()

Is an access token available for these credentials?

best_grant_strategy()

Based on available credentials returns the best strategy

@todo Add a means to dictate which should or shouldn‘t be used

refresh_token?()

Is a refresh token available for these credentials?

update_tokens(access_token, refresh_token = nil)

Updates the credentials with newer tokens

user_details?()

Returns true if user details are available @return [Boolean]

[Validate]