Class: T2Server::HttpBasic
- Inherits:
-
HttpCredentials
- Object
- HttpCredentials
- T2Server::HttpBasic
- Defined in:
- lib/t2-server/net/credentials.rb
Overview
A class representing HTTP Basic credentials. Use this class to authenticate operations on a Taverna Server that require it.
See also Util.strip_uri_credentials.
Instance Attribute Summary
Attributes inherited from HttpCredentials
Instance Method Summary collapse
-
#authenticate(request) ⇒ Object
:stopdoc: Authenticate the supplied HTTP request with the credentials held within this class.
-
#initialize(username, password) ⇒ HttpBasic
constructor
:call-seq: new(username, password) -> HttpBasic.
Methods inherited from HttpCredentials
Constructor Details
#initialize(username, password) ⇒ HttpBasic
:call-seq:
new(username, password) -> HttpBasic
Create a set of basic credentials using the supplied username and password.
88 89 90 |
# File 'lib/t2-server/net/credentials.rb', line 88 def initialize(username, password) super(username, password) end |
Instance Method Details
#authenticate(request) ⇒ Object
:stopdoc: Authenticate the supplied HTTP request with the credentials held within this class.
95 96 97 |
# File 'lib/t2-server/net/credentials.rb', line 95 def authenticate(request) request.basic_auth @username, @password end |