oidc: Display error if applicable
This commit is contained in:
@ -124,7 +124,7 @@ func (c *OIDCConfig) callbackHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Printf("[security][callbackHandler] Subject %s is not in the list of allowed subjects", idToken.Subject)
|
log.Printf("[security][callbackHandler] Subject %s is not in the list of allowed subjects", idToken.Subject)
|
||||||
http.Redirect(w, r, "/login?error=access_denied", http.StatusFound)
|
http.Redirect(w, r, "/?error=access_denied", http.StatusFound)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *OIDCConfig) setSessionCookie(w http.ResponseWriter, idToken *oidc.IDToken) {
|
func (c *OIDCConfig) setSessionCookie(w http.ResponseWriter, idToken *oidc.IDToken) {
|
||||||
|
@ -11,6 +11,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="$route && $route.query.error" class="text-red-500 text-center my-2">
|
||||||
|
<div class="text-xl">
|
||||||
|
<span class="text-red-500" v-if="$route.query.error === 'access_denied'">You do not have access to this status page</span>
|
||||||
|
<span class="text-red-500" v-else>{{ $route.query.error }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div v-if="config && config.oidc && !config.authenticated">
|
<div v-if="config && config.oidc && !config.authenticated">
|
||||||
<a :href="`${SERVER_URL}/oidc/login`" class="max-w-lg mx-auto w-full flex justify-center py-3 px-4 border border-transparent rounded-md shadow-lg text-white bg-green-700 hover:bg-green-800">
|
<a :href="`${SERVER_URL}/oidc/login`" class="max-w-lg mx-auto w-full flex justify-center py-3 px-4 border border-transparent rounded-md shadow-lg text-white bg-green-700 hover:bg-green-800">
|
||||||
Login with OIDC
|
Login with OIDC
|
||||||
@ -57,6 +63,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
error: '',
|
||||||
retrievedConfig: false,
|
retrievedConfig: false,
|
||||||
config: { oidc: false, authenticated: true },
|
config: { oidc: false, authenticated: true },
|
||||||
tooltip: {},
|
tooltip: {},
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user