Eiffel.framework.auth.oauth.mustache Maven / Gradle / Ivy
{{>noteinfo}}
class
OAUTH
inherit
AUTHENTICATION
feature -- Access
access_token: detachable STRING_32
feature -- Change Element
set_access_token (a_token: STRING_32)
-- Set `access_token' with `a_token'.
do
access_token := a_token
ensure
access_token_set: access_token = a_token
end
apply_to_params (a_query_params: LIST [TUPLE [name:READABLE_STRING_8; value:READABLE_STRING_8]]; a_header_params: STRING_TABLE [READABLE_STRING_8])
-- .
do
if attached access_token as l_access_token then
-- TODO check if this conversion is ok.
a_header_params.force ("Bearer " + l_access_token.to_string_8,"Authorization" )
end
end
end
© 2015 - 2024 Weber Informatics LLC | Privacy Policy