Merge pull request #183 from stongo/issue-135

server: add scope to newLoginURLFromSession
This commit is contained in:
bobbyrullo 2015-11-18 12:14:35 -08:00
commit 76befe03bc

View file

@ -296,6 +296,9 @@ func newLoginURLFromSession(issuer url.URL, ses *session.Session, register bool,
if msgCode != "" { if msgCode != "" {
v.Set("msg_code", msgCode) v.Set("msg_code", msgCode)
} }
if len(ses.Scope) > 0 {
v.Set("scope", strings.Join(ses.Scope, " "))
}
loginURL.RawQuery = v.Encode() loginURL.RawQuery = v.Encode()
return &loginURL return &loginURL