class MediaWiktory::Wikipedia::Actions::Oathvalidate

Validate a two-factor authentication (OATH) token.

Usage:

“`ruby api.oathvalidate.user(value).perform # returns string with raw output # or api.oathvalidate.user(value).response # returns output parsed and wrapped into Response object “`

See {Base} for generic explanation of working with MediaWiki actions and {MediaWiktory::Wikipedia::Response} for working with action responses.

All action's parameters are documented as its public methods, see below.

Public Instance Methods

token(value) click to toggle source

A “csrf” token retrieved from action=query&meta=tokens

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/actions/oathvalidate.rb, line 42
def token(value)
  merge(token: value.to_s)
end
totp(value) click to toggle source

Two-factor authentication (OATH) token.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/actions/oathvalidate.rb, line 34
def totp(value)
  merge(totp: value.to_s)
end
user(value) click to toggle source

User to validate token for. Defaults to the current user.

@param value [String] @return [self]

# File lib/mediawiktory/wikipedia/actions/oathvalidate.rb, line 26
def user(value)
  merge(user: value.to_s)
end