feat: ui for oauth
This commit is contained in:
@@ -107,95 +107,145 @@
|
|||||||
reverse
|
reverse
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="authType === 'basic'" class="space-y-2 p-2">
|
<div v-if="authType === 'basic'" class="border-b border-dividerLight flex">
|
||||||
<div class="flex relative">
|
<div class="border-r border-dividerLight space-y-2 p-2 w-2/3">
|
||||||
<input
|
<div class="flex relative">
|
||||||
id="http_basic_user"
|
<input
|
||||||
v-model="basicUsername"
|
id="http_basic_user"
|
||||||
class="input floating-input"
|
v-model="basicUsername"
|
||||||
placeholder=" "
|
class="input floating-input"
|
||||||
name="http_basic_user"
|
placeholder=" "
|
||||||
/>
|
name="http_basic_user"
|
||||||
<label for="http_basic_user">
|
/>
|
||||||
{{ $t("authorization.username") }}
|
<label for="http_basic_user">
|
||||||
</label>
|
{{ $t("authorization.username") }}
|
||||||
</div>
|
</label>
|
||||||
<div class="flex relative">
|
</div>
|
||||||
<input
|
<div class="flex relative">
|
||||||
id="http_basic_passwd"
|
<input
|
||||||
v-model="basicPassword"
|
id="http_basic_passwd"
|
||||||
class="input floating-input"
|
v-model="basicPassword"
|
||||||
placeholder=" "
|
class="input floating-input"
|
||||||
name="http_basic_passwd"
|
placeholder=" "
|
||||||
:type="passwordFieldType"
|
name="http_basic_passwd"
|
||||||
/>
|
:type="passwordFieldType"
|
||||||
<label for="http_basic_passwd">
|
/>
|
||||||
{{ $t("authorization.password") }}
|
<label for="http_basic_passwd">
|
||||||
</label>
|
{{ $t("authorization.password") }}
|
||||||
<ButtonSecondary
|
</label>
|
||||||
:icon="passwordFieldType === 'text' ? 'visibility' : 'visibility_off'"
|
<ButtonSecondary
|
||||||
outline
|
:icon="
|
||||||
class="rounded ml-2"
|
passwordFieldType === 'text' ? 'visibility' : 'visibility_off'
|
||||||
@click.native="switchVisibility"
|
"
|
||||||
/>
|
outline
|
||||||
</div>
|
class="rounded ml-2"
|
||||||
<div class="p-2">
|
@click.native="switchVisibility"
|
||||||
<div class="text-secondaryLight pb-2">
|
/>
|
||||||
{{ $t("helpers.authorization") }}
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="
|
||||||
|
h-full
|
||||||
|
top-upperTertiaryStickyFold
|
||||||
|
min-w-46
|
||||||
|
max-w-1/3
|
||||||
|
p-4
|
||||||
|
z-9
|
||||||
|
sticky
|
||||||
|
overflow-auto
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div class="p-2">
|
||||||
|
<div class="text-secondaryLight pb-2">
|
||||||
|
{{ $t("helpers.authorization") }}
|
||||||
|
</div>
|
||||||
|
<SmartAnchor
|
||||||
|
class="link"
|
||||||
|
:label="`${$t('authorization.learn')} \xA0 →`"
|
||||||
|
to="https://docs.hoppscotch.io/"
|
||||||
|
blank
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<SmartAnchor
|
|
||||||
class="link"
|
|
||||||
:label="$t('action.learn_more')"
|
|
||||||
to="https://docs.hoppscotch.io/"
|
|
||||||
blank
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="authType === 'bearer'" class="space-y-2 p-2">
|
<div v-if="authType === 'bearer'" class="border-b border-dividerLight flex">
|
||||||
<div class="flex relative">
|
<div class="border-r border-dividerLight space-y-2 p-2 w-2/3">
|
||||||
<input
|
<div class="flex relative">
|
||||||
id="bearer_token"
|
<input
|
||||||
v-model="bearerToken"
|
id="bearer_token"
|
||||||
class="input floating-input"
|
v-model="bearerToken"
|
||||||
placeholder=" "
|
class="input floating-input"
|
||||||
name="bearer_token"
|
placeholder=" "
|
||||||
/>
|
name="bearer_token"
|
||||||
<label for="bearer_token"> Token </label>
|
/>
|
||||||
</div>
|
<label for="bearer_token"> Token </label>
|
||||||
<div class="p-2">
|
</div>
|
||||||
<div class="text-secondaryLight pb-2">
|
</div>
|
||||||
{{ $t("helpers.authorization") }}
|
<div
|
||||||
|
class="
|
||||||
|
h-full
|
||||||
|
top-upperTertiaryStickyFold
|
||||||
|
min-w-46
|
||||||
|
max-w-1/3
|
||||||
|
p-4
|
||||||
|
z-9
|
||||||
|
sticky
|
||||||
|
overflow-auto
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div class="p-2">
|
||||||
|
<div class="text-secondaryLight pb-2">
|
||||||
|
{{ $t("helpers.authorization") }}
|
||||||
|
</div>
|
||||||
|
<SmartAnchor
|
||||||
|
class="link"
|
||||||
|
:label="`${$t('authorization.learn')} \xA0 →`"
|
||||||
|
to="https://docs.hoppscotch.io/"
|
||||||
|
blank
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<SmartAnchor
|
|
||||||
class="link"
|
|
||||||
:label="$t('action.learn_more')"
|
|
||||||
to="https://docs.hoppscotch.io/"
|
|
||||||
blank
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="authType === 'oauth-2'" class="space-y-2 p-2">
|
<div
|
||||||
<div class="flex relative">
|
v-if="authType === 'oauth-2'"
|
||||||
<input
|
class="border-b border-dividerLight flex"
|
||||||
id="oauth2_token"
|
>
|
||||||
v-model="oauth2Token"
|
<div class="border-r border-dividerLight space-y-2 p-2 w-2/3">
|
||||||
class="input floating-input"
|
<div class="flex relative">
|
||||||
placeholder=" "
|
<input
|
||||||
name="oauth2_token"
|
id="oauth2_token"
|
||||||
/>
|
v-model="oauth2Token"
|
||||||
<label for="oauth2_token"> Token </label>
|
class="input floating-input"
|
||||||
</div>
|
placeholder=" "
|
||||||
<HttpOAuth2Authorization />
|
name="oauth2_token"
|
||||||
<div class="p-2">
|
/>
|
||||||
<div class="text-secondaryLight pb-2">
|
<label for="oauth2_token"> Token </label>
|
||||||
{{ $t("helpers.authorization") }}
|
</div>
|
||||||
|
<HttpOAuth2Authorization />
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="
|
||||||
|
h-full
|
||||||
|
top-upperTertiaryStickyFold
|
||||||
|
min-w-46
|
||||||
|
max-w-1/3
|
||||||
|
p-4
|
||||||
|
z-9
|
||||||
|
sticky
|
||||||
|
overflow-auto
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div class="p-2">
|
||||||
|
<div class="text-secondaryLight pb-2">
|
||||||
|
{{ $t("helpers.authorization") }}
|
||||||
|
</div>
|
||||||
|
<SmartAnchor
|
||||||
|
class="link"
|
||||||
|
:label="`${$t('authorization.learn')} \xA0 →`"
|
||||||
|
to="https://docs.hoppscotch.io/"
|
||||||
|
blank
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<SmartAnchor
|
|
||||||
class="link"
|
|
||||||
:label="$t('action.learn_more')"
|
|
||||||
to="https://docs.hoppscotch.io/"
|
|
||||||
blank
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
placeholder=" "
|
placeholder=" "
|
||||||
name="oidcDiscoveryURL"
|
name="oidcDiscoveryURL"
|
||||||
/>
|
/>
|
||||||
<label for="oidcDiscoveryURL">oidcDiscoveryURL </label>
|
<label for="oidcDiscoveryURL"> OpenID Connect Discovery URL </label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex relative">
|
<div class="flex relative">
|
||||||
<input
|
<input
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
placeholder=" "
|
placeholder=" "
|
||||||
name="authURL"
|
name="authURL"
|
||||||
/>
|
/>
|
||||||
<label for="authURL">authURL </label>
|
<label for="authURL"> Authentication URL </label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex relative">
|
<div class="flex relative">
|
||||||
<input
|
<input
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
placeholder=" "
|
placeholder=" "
|
||||||
name="accessTokenURL"
|
name="accessTokenURL"
|
||||||
/>
|
/>
|
||||||
<label for="accessTokenURL">accessTokenURL </label>
|
<label for="accessTokenURL"> Access Token URL </label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex relative">
|
<div class="flex relative">
|
||||||
<input
|
<input
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
placeholder=" "
|
placeholder=" "
|
||||||
name="clientID"
|
name="clientID"
|
||||||
/>
|
/>
|
||||||
<label for="clientID">clientID </label>
|
<label for="clientID"> Client ID </label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex relative">
|
<div class="flex relative">
|
||||||
<input
|
<input
|
||||||
@@ -48,11 +48,11 @@
|
|||||||
placeholder=" "
|
placeholder=" "
|
||||||
name="scope"
|
name="scope"
|
||||||
/>
|
/>
|
||||||
<label for="scope">scope </label>
|
<label for="scope"> Scope </label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ButtonPrimary
|
<ButtonPrimary
|
||||||
label="Get request"
|
:label="$t('authorization.generate_token')"
|
||||||
@click.native="handleAccessTokenRequest()"
|
@click.native="handleAccessTokenRequest()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -85,7 +85,9 @@
|
|||||||
"we_sent_magic_link_description": "Check your inbox - we sent an email to {email}. It contains a magic link that will log you in."
|
"we_sent_magic_link_description": "Check your inbox - we sent an email to {email}. It contains a magic link that will log you in."
|
||||||
},
|
},
|
||||||
"authorization": {
|
"authorization": {
|
||||||
|
"generate_token": "Generate Token",
|
||||||
"include_in_url": "Include in URL",
|
"include_in_url": "Include in URL",
|
||||||
|
"learn": "Learn how",
|
||||||
"password": "Password",
|
"password": "Password",
|
||||||
"token": "Token",
|
"token": "Token",
|
||||||
"type": "Authorization Type",
|
"type": "Authorization Type",
|
||||||
|
|||||||
Reference in New Issue
Block a user