Class: OauthAuthMethods
| Defined in: | src/methods/oauth-auth-methods.coffee |
Overview
Provides methods to interact with the auth store.
Instance Method Summary
- # (void) currentDateAndSeconds(seconds = TENYEARSINSECONDS) Bound Returns the current date + seconds
- # (void) appForClientId(clientId, options = {}, cb = function() {}) Bound Retrieves an app for a key.
- # (void) validate(token, clientId, options = {}, cb = function() {}) Bound Somehow validates a token.
- # (void) createAccessGrant(accountId, appId, userId, redirectUrl, scope, realm = null, options = {}, cb = function() {}) Bound Creates a new access grant.
- # (void) createOrReuseTokenForUserId(accountId, userId, clientId, realm, scope, expiresIn, options = {}, cb = function() {}) Bound Creates a token for a user/app/realm
- # (void) createTokenForUserId(accountId, userId, clientId, realm = null, scope = null, expiresIn = null, options = {}, cb = function() {}) Bound Creates a token for a user/app/realm
- # (void) exchangeAuthorizationCodeForAccessToken(code, options = {}, cb = function() {}) Bound Takes a code and exchanges it for an access token
- # (void) exchangeRefreshTokenForAccessToken(refreshToken, options = {}, cb = function() {}) Bound Takes a code and exchanges it for an access token
Constructor Details
#
(void)
constructor(models)
Initializes a new instance of the @see AuthMethods class.
Instance Method Details
#
(void)
currentDateAndSeconds(seconds = TENYEARSINSECONDS)
Bound
Returns the current date + seconds
#
(void)
appForClientId(clientId, options = {}, cb = function() {})
Bound
Retrieves an app for a key. This ONLY retrieves active keys
#
(void)
validate(token, clientId, options = {}, cb = function() {})
Bound
Somehow validates a token. A valid token exists, has not been revoked yet, has an expiration higher than now. isClientValid can be checked for tighter security.
#
(void)
createAccessGrant(accountId, appId, userId, redirectUrl, scope, realm = null, options = {}, cb = function() {})
Bound
Creates a new access grant.
#
(void)
createOrReuseTokenForUserId(accountId, userId, clientId, realm, scope, expiresIn, options = {}, cb = function() {})
Bound
Creates a token for a user/app/realm
#
(void)
createTokenForUserId(accountId, userId, clientId, realm = null, scope = null, expiresIn = null, options = {}, cb = function() {})
Bound
Creates a token for a user/app/realm
#
(void)
exchangeAuthorizationCodeForAccessToken(code, options = {}, cb = function() {})
Bound
Takes a code and exchanges it for an access token
#
(void)
exchangeRefreshTokenForAccessToken(refreshToken, options = {}, cb = function() {})
Bound
Takes a code and exchanges it for an access token