public AuthorizationRedirect GetRedirect() { var url = this.AuthorizationUrl; var client = this.ClientID; var redirect = RedirectUrl; var state = Base64Url.Encode(CryptoRandom.CreateRandomKey(10)); var scope = this.Scope; var authorizationUrl = String.Format("{0}?client_id={1}&redirect_uri={2}&state={3}&response_type=code&scope={4}", url, client, redirect, state, scope); var ctx = new AuthorizationRedirect { AuthorizationUrl = authorizationUrl, State = state }; return ctx; }
public AuthorizationRedirect GetRedirect() { var url = this.AuthorizationUrl; var client = this.ClientID; var redirect = RedirectUrl; var state = Base64Url.Encode(CryptoRandom.CreateRandomKey(10)); var scope = this.Scope; var authorizationUrl = String.Format("{0}?client_id={1}&redirect_uri={2}&state={3}&response_type=code&scope={4}", url, client, redirect, state, scope); var ctx = new AuthorizationRedirect { AuthorizationUrl = authorizationUrl, State = state }; return(ctx); }