lib/uaa/token_issuer.rb in cf-uaa-lib-3.2.5 vs lib/uaa/token_issuer.rb in cf-uaa-lib-3.3.0
- old
+ new
@@ -243,9 +243,16 @@
def owner_password_grant(username, password, scope = nil)
request_token(:grant_type => 'password', :username => username,
:password => password, :scope => scope)
end
+ # Uses a one-time passcode obtained from the UAA to get a
+ # token.
+ # @return [TokenInfo]
+ def passcode_grant(passcode, scope = nil)
+ request_token(:grant_type => 'password', :passcode => passcode, :scope => scope)
+ end
+
# Gets an access token with the user credentials used for authentication
# via the owner password grant.
# See {http://tools.ietf.org/html/rfc6749#section-4.3}.
# @param credentials should be an object such as a hash that can be converted
# to a json representation of the credential name/value pairs corresponding to