{% import ( "source.toby3d.me/toby3d/auth/internal/domain" ) %} {% code type AuthorizePage struct { BaseOf Scope domain.Scopes CodeChallengeMethod domain.CodeChallengeMethod ResponseType domain.ResponseType Client *domain.Client Me *domain.Me RedirectURI *domain.URL Providers []*domain.Provider CSRF []byte CodeChallenge string State string } %} {% func (p *AuthorizePage) title() %} {% if p.Client.Name != "" %} {%= p.t("Authorize %s", p.Client.Name) %} {% else %} {%= p.t("Authorize application") %} {% endif %} {% endfunc %} {% func (p *AuthorizePage) body() %}
{% if p.Client.Logo != nil %} {%s p.Client.Name %} {% endif %}

{% if p.Client.URL != nil %} {% endif %} {% if p.Client.Name != "" %} {%s p.Client.Name %} {% else %} {%s p.Client.ID.String() %} {% endif %} {% if p.Client.URL != nil %} {% endif %}

{% if p.CSRF != nil %} {% endif %} {% for key, val := range map[string]string{ "client_id": p.Client.ID.String(), "redirect_uri": p.RedirectURI.String(), "response_type": p.ResponseType.String(), "state": p.State, } %} {% endfor %} {% if len(p.Scope) > 0 %}
{%= p.t("Scopes") %} {% for _, scope := range p.Scope %}
{% endfor %}
{% else %} {% endif %} {% if p.CodeChallenge != "" %} {% for key, val := range map[string]string{ "code_challenge": p.CodeChallenge, "code_challenge_method": p.CodeChallengeMethod.String(), } %} {% endfor %} {% endif %} {% if p.Me != nil %} {% endif %} {% if len(p.Providers) > 0 %} {% else %} {% endif %}
{% endfunc %}