Example #1
0
 internal static ResourceOwner FromXElement(XElement element)
 {
     var resourceOwner = new ResourceOwner(element.Element("name").Value);
     if(element.Element("guid") != null)
         resourceOwner.Guid = Guid.Parse(element.Element("guid").Value);
     return resourceOwner;
 }
        internal static ResourceOwner FromXElement(XElement element)
        {
            var resourceOwner = new ResourceOwner(element.Element("name").Value);

            if (element.Element("guid") != null)
            {
                resourceOwner.Guid = Guid.Parse(element.Element("guid").Value);
            }
            return(resourceOwner);
        }
Example #3
0
        internal static Token GetToken(ServerWithAuthorizationCode server, ResourceOwner resourceOwner)
        {
            GetTokensInstance();
            var token =
                _tokens.FirstOrDefault(t => (t.Server.Guid == server.Guid && t.ResourceOwner.Name == resourceOwner.Name));

            if (token == null)
            {
                token = new Token(server, resourceOwner);
                _tokens.Add(token);
            }
            return(token);
        }
 private void CmdResourceOwnerCreateClick(object sender, EventArgs e)
 {
     _resourceOwner = ResourceOwners.Add(txtResourceOwnerName.Text);
     lblResourceOwnerGUID.Text = _resourceOwner.Guid.ToString();
 }
Example #5
0
 internal Token(Server server, ResourceOwner resourceOwner)
 {
     Server = server;
     ResourceOwner = resourceOwner;
 }
Example #6
0
 internal Token(Server server, ResourceOwner resourceOwner)
 {
     Server        = server;
     ResourceOwner = resourceOwner;
 }